flake: fix usage of prev in overlays

This commit is contained in:
Jacob Birkett 2023-05-01 20:03:46 -07:00 committed by Mihai Fufezan
parent 6dfee22647
commit 525960bb75

View file

@ -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);