more fixes that only surface when used lol
This commit is contained in:
parent
c35a67f490
commit
1647556eb0
1 changed files with 16 additions and 10 deletions
26
flake.nix
26
flake.nix
|
@ -23,10 +23,15 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
makeApp = pkgs: name: exe:
|
makeApp = pkgs: name: exe: {
|
||||||
{ type = "app"; program = "${pkgs.${name}}/bin/${defaultTo name exe}"; };
|
inherit name;
|
||||||
|
value = {
|
||||||
|
type = "app";
|
||||||
|
program = "${pkgs.${name}}/bin/${defaultTo name exe}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
linuxApps = pkgs: [
|
linuxApps = pkgs: builtins.listToAttrs [
|
||||||
(makeApp pkgs "basilisk" null)
|
(makeApp pkgs "basilisk" null)
|
||||||
(makeApp pkgs "isabelle" null)
|
(makeApp pkgs "isabelle" null)
|
||||||
(makeApp pkgs "firefox-esr-alias" "firefox-esr")
|
(makeApp pkgs "firefox-esr-alias" "firefox-esr")
|
||||||
|
@ -34,15 +39,16 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
ifLinux64 = f: pkgs: optionalAttrs (pkgs.system == "x86_64-linux") (f pkgs);
|
ifLinux64 = sys: optionalAttrs (sys == "x86_64-linux");
|
||||||
|
|
||||||
mkPackages = pkgs:
|
mkPackages = sys: pkgs:
|
||||||
ifLinux64 linuxPackages pkgs // crossPlatformPackages pkgs // fonts pkgs;
|
ifLinux64 sys (linuxPackages pkgs) //
|
||||||
|
crossPlatformPackages pkgs // fonts pkgs;
|
||||||
|
|
||||||
mkApps = pkgs: ifLinux64 linuxApps pkgs;
|
mkApps = sys: pkgs: ifLinux64 sys (linuxApps pkgs);
|
||||||
in {
|
in {
|
||||||
packages = forAllSystems (sys: mkPackages nixpkgs.legacyPackages.${sys});
|
packages = forAllSystems (sys: mkPackages sys nixpkgs.legacyPackages.${sys});
|
||||||
apps = forAllSystems (sys: mkApps nixpkgs.legacyPackages.${sys});
|
apps = forAllSystems (sys: mkApps sys nixpkgs.legacyPackages.${sys});
|
||||||
overlays = forAllSystems (sys: final: prev: mkApps final);
|
overlays = forAllSystems (sys: final: prev: mkPackages sys final);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue