Skip to content

Commit 310b80c

Browse files
committed
allow unsupported
1 parent 434c8a7 commit 310b80c

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed

flake.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
outputs = { self, nixpkgs, libhc }: {
1212
packages.x86_64-linux = let
1313

14-
pkgs = nixpkgs.legacyPackages.x86_64-linux;
14+
pkgs = import nixpkgs {
15+
system = "x86_64-linux";
16+
config = {
17+
allowUnsupportedSystem = true;
18+
};
19+
};
1520

1621
hyperfsFromPkgs = pkgs:
1722
pkgs.callPackage ./src/pkgs/hyperfs { inherit libhc; };

src/build-dist.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ let
88
inherit (pkgs) system;
99
crossOverlays = import ./cross-overlays.nix;
1010
crossSystem = archs.${arch};
11+
config = {
12+
allowUnsupportedSystem = true;
13+
};
1114
};
1215

1316
iglooName = pkg: pkg.iglooName or pkg.meta.mainProgram;

src/cross-overlays.nix

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,43 @@
2323
p11-kit = super.p11-kit.overrideAttrs { doCheck = false; };
2424
})
2525

26-
# Add musl support for loongarch64
26+
# Add musl support for loongarch64 and powerpc
2727
(self: super: {
28-
musl = if super.stdenv.hostPlatform.config == "loongarch64-linux-musl"
28+
musl = if builtins.any (x: x == super.stdenv.hostPlatform.config) [
29+
"loongarch64-linux-musl"
30+
"powerpc-linux-musl"
31+
]
2932
then super.musl.overrideAttrs (oldAttrs: {
3033
meta = oldAttrs.meta // {
31-
platforms = oldAttrs.meta.platforms ++ ["loongarch64-linux"];
34+
platforms = oldAttrs.meta.platforms ++ [
35+
"loongarch64-linux"
36+
"powerpc-linux"
37+
];
3238
badPlatforms = [];
3339
};
3440
})
3541
else super.musl;
3642
})
43+
44+
# Add linux-headers support for powerpc-linux
45+
(self: super: {
46+
linux-headers = super.linux-headers.overrideAttrs (oldAttrs: {
47+
meta = oldAttrs.meta // {
48+
platforms = oldAttrs.meta.platforms ++ [ "powerpc-linux" ];
49+
};
50+
});
51+
})
52+
53+
# Add bash support for powerpc-linux-musl and other missing platforms
54+
(self: super: {
55+
bash = super.bash.overrideAttrs (oldAttrs: {
56+
meta = oldAttrs.meta // {
57+
platforms = oldAttrs.meta.platforms ++ [
58+
"powerpc-linux"
59+
"powerpc-linux-musl"
60+
];
61+
};
62+
});
63+
})
3764

3865
]

0 commit comments

Comments
 (0)