@@ -6,6 +6,8 @@ with builtins;
6
6
unzip ,
7
7
zip ,
8
8
unixtools ,
9
+ stdenv ,
10
+ buildPackages ,
9
11
10
12
busybox ? pkgs . pkgsStatic . busybox ,
11
13
cacert ? pkgs . cacert ,
@@ -17,8 +19,6 @@ with builtins;
17
19
xz ? pkgs . pkgsStatic . xz ,
18
20
zstd ? pkgs . pkgsStatic . zstd ,
19
21
nixStatic ? pkgs . pkgsStatic . nix ,
20
-
21
- buildSystem ? builtins . currentSystem ,
22
22
# hardcode executable to run. Useful when creating a bundle.
23
23
bundledPackage ? null ,
24
24
...
35
35
36
36
nixpkgsSrc = pkgs . path ;
37
37
38
- pkgsBuild = import pkgs . path { system = buildSystem ; } ;
39
-
40
38
# TODO: git could be more minimal via:
41
39
# perlSupport=false; guiSupport=false; nlsSupport=false;
42
40
gitAttribute = "gitMinimal" ;
43
41
git = pkgs . "${ gitAttribute } " ;
44
42
45
43
maketar = targets :
46
- pkgsBuild . stdenv . mkDerivation {
44
+ stdenv . mkDerivation {
47
45
name = "nix-portable-store-tarball" ;
48
- nativeBuildInputs = [ pkgsBuild . perl pkgsBuild . zstd ] ;
46
+ nativeBuildInputs = [ perl zstd ] ;
49
47
exportReferencesGraph = map ( x : [ ( "closure-" + baseNameOf x ) x ] ) targets ;
50
48
buildCommand = ''
51
- storePaths=$(perl ${ pkgsBuild . pathsFromGraph } ./closure-*)
49
+ storePaths=$(perl ${ buildPackages . pathsFromGraph } ./closure-*)
52
50
mkdir $out
53
51
echo $storePaths > $out/index
54
- cp -r ${ pkgsBuild . closureInfo { rootPaths = targets ; } } $out/closureInfo
52
+ cp -r ${ buildPackages . closureInfo { rootPaths = targets ; } } $out/closureInfo
55
53
56
54
tar -cf - \
57
55
--owner=0 --group=0 --mode=u+rw,uga+r \
0 commit comments