Skip to content

Commit

Permalink
chore(nix): use self for version
Browse files Browse the repository at this point in the history
Signed-off-by: seth <[email protected]>
  • Loading branch information
getchoo committed Oct 25, 2024
1 parent a5c554c commit 63b1073
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
26 changes: 10 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions nix/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
self,
stripJavaArchivesHook,
tomlplusplus,
version,
zlib,

msaClientID ? null,
Expand All @@ -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;
Expand Down

0 comments on commit 63b1073

Please sign in to comment.