Skip to content

Commit 46d1214

Browse files
committed
use static bins for stage1 and stage2
1 parent a54c848 commit 46d1214

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

default.nix

+24-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
with builtins;
22
{
3-
bubblewrap,
4-
nix,
3+
bubblewrapStatic ? pkgsStatic.bubblewrap,
4+
# fix: builder failed to produce output path for output 'man'
5+
# https://github.com/milahu/nixpkgs/issues/83
6+
#nixStatic ? pkgsStatic.nix,
7+
nixGitStatic ? pkgsStatic.nixVersions.nixComponents_git.nix-everything,
58
unzip,
69
zip,
710
unixtools,
@@ -12,14 +15,16 @@ with builtins;
1215
patchelf,
1316
cacert,
1417
pkgs,
15-
# no. pkgsStatic.nix and pkgsStatic.proot are not cached
16-
# still an issue: https://github.com/NixOS/nixpkgs/issues/81137
17-
# pkgsStatic,
18-
busybox,
18+
pkgsStatic,
19+
busyboxStatic ? pkgsStatic.busybox,
1920
gnutar,
2021
xz,
21-
zstd,
22-
proot,
22+
zstdStatic ? pkgsStatic.zstd,
23+
# fix: ld: attempted static link of dynamic object
24+
# https://gitlab.com/ita1024/waf/-/issues/2467
25+
#prootStatic ? pkgsStatic.proot,
26+
callPackage,
27+
prootStatic ? (callPackage ./proot/alpine.nix { }),
2328
compression ? "zstd -3 -T1",
2429
buildSystem ? builtins.currentSystem,
2530
# # tar crashed on emulated aarch64 system
@@ -32,6 +37,17 @@ with builtins;
3237
with lib;
3338
let
3439

40+
nixStatic = nixGitStatic;
41+
42+
# stage1 bins
43+
busybox = busyboxStatic;
44+
zstd = zstdStatic;
45+
46+
# stage2 bins
47+
nix = nixStatic;
48+
bubblewrap = bubblewrapStatic;
49+
proot = prootStatic;
50+
3551
pname =
3652
if bundledPackage == null
3753
then "nix-portable"

0 commit comments

Comments
 (0)