From 31031ec92311c1ccba385ce4cb10553f8172a2ed Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 25 Oct 2024 02:34:15 -0400 Subject: [PATCH] chore(nix): use `self` for version Signed-off-by: seth (cherry picked from commit 63b10738b2a1065d55077e729fcada6e7f64d10a) --- flake.nix | 26 ++++++++++---------------- nix/unwrapped.nix | 3 +-- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/flake.nix b/flake.nix index f4ca782ec..54add656d 100644 --- a/flake.nix +++ b/flake.nix @@ -85,24 +85,18 @@ formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style); - overlays.default = - final: prev: - let - version = builtins.substring 0 8 self.lastModifiedDate or "dirty"; - in - { - prismlauncher-unwrapped = prev.callPackage ./nix/unwrapped.nix { - inherit - libnbtplusplus - nix-filter - self - version - ; - }; - - prismlauncher = final.callPackage ./nix/wrapper.nix { }; + overlays.default = final: prev: { + prismlauncher-unwrapped = prev.callPackage ./nix/unwrapped.nix { + inherit + libnbtplusplus + nix-filter + self + ; }; + prismlauncher = final.callPackage ./nix/wrapper.nix { }; + }; + packages = forAllSystems ( system: let diff --git a/nix/unwrapped.nix b/nix/unwrapped.nix index 237f36c1f..1b14886ef 100644 --- a/nix/unwrapped.nix +++ b/nix/unwrapped.nix @@ -15,7 +15,6 @@ self, stripJavaArchivesHook, tomlplusplus, - version, zlib, msaClientID ? null, @@ -28,7 +27,7 @@ assert lib.assertMsg ( stdenv.mkDerivation { pname = "prismlauncher-unwrapped"; - inherit version; + version = self.shortRev or self.dirtyShortRev or "unknown"; src = nix-filter.lib { root = self;