mirror of
https://github.com/hyprwm/hyprland-protocols.git
synced 2024-11-25 22:35:59 +01:00
flake: fix usage of prev in overlays
This commit is contained in:
parent
6dfee22647
commit
525960bb75
1 changed files with 8 additions and 4 deletions
12
flake.nix
12
flake.nix
|
@ -13,7 +13,11 @@
|
|||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
pkgsFor = nixpkgs.legacyPackages;
|
||||
pkgsFor = genSystems (system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [self.overlays.default];
|
||||
});
|
||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||
(builtins.substring 0 4 longDate)
|
||||
(builtins.substring 4 2 longDate)
|
||||
|
@ -21,12 +25,12 @@
|
|||
]);
|
||||
version = "0.1" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
in {
|
||||
overlays.default = _: prev: {
|
||||
hyprland-protocols = prev.callPackage ./nix/default.nix {inherit version;};
|
||||
overlays.default = final: prev: {
|
||||
hyprland-protocols = final.callPackage ./nix/default.nix {inherit version;};
|
||||
};
|
||||
|
||||
packages = genSystems (system:
|
||||
(self.overlays.default null pkgsFor.${system})
|
||||
(self.overlays.default pkgsFor.${system} pkgsFor.${system})
|
||||
// {default = self.packages.${system}.hyprland-protocols;});
|
||||
|
||||
formatter = genSystems (system: pkgsFor.${system}.alejandra);
|
||||
|
|
Loading…
Reference in a new issue