Nix: move dependency overrides inside wlroots-hyprland call

This fixes overlays failing to build.
Fixes #1704
This commit is contained in:
Mihai Fufezan 2023-03-05 14:10:49 +02:00
parent 5184b542b1
commit 7bae0823c8
No known key found for this signature in database
GPG key ID: 5899325F2F120900

View file

@ -32,11 +32,20 @@
"x86_64-linux" "x86_64-linux"
]; ];
pkgsFor = genSystems (system: pkgsFor = nixpkgs.legacyPackages;
import nixpkgs {
inherit system; props = builtins.fromJSON (builtins.readFile ./props.json);
overlays = [
(_: prev: { mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
in {
overlays.default = _: prev: rec {
wlroots-hyprland = prev.callPackage ./nix/wlroots.nix {
version = mkDate (inputs.wlroots.lastModifiedDate or "19700101") + "_" + (inputs.wlroots.shortRev or "dirty");
src = inputs.wlroots;
libdisplay-info = prev.libdisplay-info.overrideAttrs (old: { libdisplay-info = prev.libdisplay-info.overrideAttrs (old: {
version = "0.1.1+date=2023-03-02"; version = "0.1.1+date=2023-03-02";
src = prev.fetchFromGitLab { src = prev.fetchFromGitLab {
@ -58,22 +67,6 @@
sha256 = "sha256-DjwlS8rXE7srs7A8+tHqXyUsFGtucYSeq6X0T/pVOc8="; sha256 = "sha256-DjwlS8rXE7srs7A8+tHqXyUsFGtucYSeq6X0T/pVOc8=";
}; };
}); });
})
];
});
props = builtins.fromJSON (builtins.readFile ./props.json);
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
in {
overlays.default = _: prev: rec {
wlroots-hyprland = prev.callPackage ./nix/wlroots.nix {
version = mkDate (inputs.wlroots.lastModifiedDate or "19700101") + "_" + (inputs.wlroots.shortRev or "dirty");
src = inputs.wlroots;
}; };
hyprland = prev.callPackage ./nix/default.nix { hyprland = prev.callPackage ./nix/default.nix {
stdenv = prev.gcc12Stdenv; stdenv = prev.gcc12Stdenv;