more fixes that only surface when used lol

This commit is contained in:
rhiannon morris 2025-04-02 19:08:27 +02:00
parent c35a67f490
commit 1647556eb0

View file

@ -23,10 +23,15 @@
];
makeApp = pkgs: name: exe:
{ type = "app"; program = "${pkgs.${name}}/bin/${defaultTo name exe}"; };
makeApp = pkgs: 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 "isabelle" null)
(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:
ifLinux64 linuxPackages pkgs // crossPlatformPackages pkgs // fonts pkgs;
mkPackages = sys: pkgs:
ifLinux64 sys (linuxPackages pkgs) //
crossPlatformPackages pkgs // fonts pkgs;
mkApps = pkgs: ifLinux64 linuxApps pkgs;
mkApps = sys: pkgs: ifLinux64 sys (linuxApps pkgs);
in {
packages = forAllSystems (sys: mkPackages nixpkgs.legacyPackages.${sys});
apps = forAllSystems (sys: mkApps nixpkgs.legacyPackages.${sys});
overlays = forAllSystems (sys: final: prev: mkApps final);
packages = forAllSystems (sys: mkPackages sys nixpkgs.legacyPackages.${sys});
apps = forAllSystems (sys: mkApps sys nixpkgs.legacyPackages.${sys});
overlays = forAllSystems (sys: final: prev: mkPackages sys final);
};
}