mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-12-22 09:49:49 +01:00
flake: fix usage of prev in overlays
flake: use overlays in pkgsFor
This commit is contained in:
parent
c0e2339555
commit
bc7d9c7366
1 changed files with 15 additions and 8 deletions
23
flake.nix
23
flake.nix
|
@ -20,7 +20,14 @@
|
|||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
pkgsFor = nixpkgs.legacyPackages;
|
||||
pkgsFor = genSystems (system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
self.overlays.default
|
||||
inputs.hyprland-protocols.overlays.default
|
||||
];
|
||||
});
|
||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||
(builtins.substring 0 4 longDate)
|
||||
(builtins.substring 4 2 longDate)
|
||||
|
@ -28,18 +35,18 @@
|
|||
]);
|
||||
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
in {
|
||||
overlays.default = _: prev: rec {
|
||||
xdg-desktop-portal-hyprland = prev.callPackage ./nix/default.nix {
|
||||
stdenv = prev.gcc12Stdenv;
|
||||
inherit (inputs.hyprland-protocols.packages.${prev.hostPlatform.system}) hyprland-protocols;
|
||||
inherit hyprland-share-picker version;
|
||||
overlays.default = final: prev: {
|
||||
xdg-desktop-portal-hyprland = final.callPackage ./nix/default.nix {
|
||||
stdenv = final.gcc12Stdenv;
|
||||
inherit (final) hyprland-protocols hyprland-share-picker;
|
||||
inherit version;
|
||||
};
|
||||
|
||||
hyprland-share-picker = prev.libsForQt5.callPackage ./nix/hyprland-share-picker.nix {inherit version;};
|
||||
hyprland-share-picker = final.libsForQt5.callPackage ./nix/hyprland-share-picker.nix {inherit version;};
|
||||
};
|
||||
|
||||
packages = genSystems (system:
|
||||
(self.overlays.default null pkgsFor.${system})
|
||||
(self.overlays.default pkgsFor.${system} pkgsFor.${system})
|
||||
// {default = self.packages.${system}.xdg-desktop-portal-hyprland;});
|
||||
|
||||
formatter = genSystems (system: pkgsFor.${system}.alejandra);
|
||||
|
|
Loading…
Reference in a new issue