on 8e39653 help sign in
appdir.nix+2−2
since splitsnapshots
unifiedsplit
@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchurl, muslPkgs, perl, pathsFromGraph, fetchFromGitHub, coreutils, bash }:
1+{ stdenv, fetchurl, muslPkgs, perl, pathsFromGraph, fetchFromGitHub, coreutils, bash }:
2
2
3let
3let
4 AppRun = targets: muslPkgs.stdenv.mkDerivation {
4 AppRun = targets: muslPkgs.stdenv.mkDerivation {
@@ -8,7 +8,7 @@ let
8
8
9 buildPhase = ''
9 buildPhase = ''
10 CC="$CC -O2 -Wall -Wno-deprecated-declarations -Wno-unused-result -static"
10 CC="$CC -O2 -Wall -Wno-deprecated-declarations -Wno-unused-result -static"
11− $CC ${./AppRun.c} -o AppRun -DENV_PATH='"${lib.makeBinPath targets}"'
11+ $CC ${./AppRun.c} -o AppRun -DENV_PATH='"${stdenv.lib.makeBinPath targets}"'
12 '';
12 '';
13
13
14 installPhase = ''
14 installPhase = ''
appimagetool.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchurl, fuse, zlib, squashfsTools, glib }:
1+{ stdenv, fetchurl, fuse, zlib, squashfsTools, glib }:
2
2
3# This is from some binaries.
3# This is from some binaries.
4
4
@@ -37,7 +37,7 @@ in stdenv.mkDerivation rec {
37 for x in $out/bin/*; do
37 for x in $out/bin/*; do
38 patchelf \
38 patchelf \
39 --set-interpreter ${dynamicLinker} \
39 --set-interpreter ${dynamicLinker} \
40− --set-rpath ${lib.makeLibraryPath [ zlib stdenv.glibc.out fuse glib ]} \
40+ --set-rpath ${stdenv.lib.makeLibraryPath [ zlib stdenv.glibc.out fuse glib ]} \
41 $x
41 $x
42 done
42 done
43 '';
43 '';
default.nix+10−12
@@ -11,11 +11,10 @@ let
11 });
11 });
12in rec {
12in rec {
13 toStorePath = target:
13 toStorePath = target:
14− # If a store path has been given but is not a derivation, add the missing context
14+ # If a store path has been given but is a string, add the missing context
15 # to it so it will be propagated properly as a build input.
15 # to it so it will be propagated properly as a build input.
16− if !(lib.isDerivation target) && lib.isStorePath target then
16+ if builtins.isString target && lib.isStorePath target then
17− let path = toString target; in
18− builtins.appendContext path { "${path}" = { path = true; }; }
17+ builtins.appendContext target { "${target}" = { path = true; }; }
19 # Otherwise, add to the store. This takes care of appending the store path
18 # Otherwise, add to the store. This takes care of appending the store path
20 # in the context automatically.
19 # in the context automatically.
21 else "${target}";
20 else "${target}";
@@ -45,7 +44,7 @@ in rec {
45 };
44 };
46
45
47 # TODO: eventually should this go in nixpkgs?
46 # TODO: eventually should this go in nixpkgs?
48− nix-user-chroot = lib.makeOverridable stdenv.mkDerivation {
47+ nix-user-chroot = stdenv.lib.makeOverridable stdenv.mkDerivation {
49 name = "nix-user-chroot-2c52b5f";
48 name = "nix-user-chroot-2c52b5f";
50 src = ./nix-user-chroot;
49 src = ./nix-user-chroot;
51
50
@@ -80,20 +79,19 @@ in rec {
80 };
79 };
81 };
80 };
82
81
83− makeStartup = { target, nixUserChrootFlags, nix-user-chroot', run, initScript }:
82+ makeStartup = { target, nixUserChrootFlags, nix-user-chroot', run }:
84 let
83 let
85 # Avoid re-adding a store path into the store
84 # Avoid re-adding a store path into the store
86 path = toStorePath target;
85 path = toStorePath target;
87 in
86 in
88 writeScript "startup" ''
87 writeScript "startup" ''
89 #!/bin/sh
88 #!/bin/sh
90− ${initScript}
91 .${nix-user-chroot'}/bin/nix-user-chroot -n ./nix ${nixUserChrootFlags} -- ${path}${run} "$@"
89 .${nix-user-chroot'}/bin/nix-user-chroot -n ./nix ${nixUserChrootFlags} -- ${path}${run} "$@"
92 '';
90 '';
93
91
94− nix-bootstrap = { target, extraTargets ? [], run, nix-user-chroot' ? nix-user-chroot, nixUserChrootFlags ? "", initScript ? "" }:
92+ nix-bootstrap = { target, extraTargets ? [], run, nix-user-chroot' ? nix-user-chroot, nixUserChrootFlags ? "" }:
95 let
93 let
96− script = makeStartup { inherit target nixUserChrootFlags nix-user-chroot' run initScript; };
94+ script = makeStartup { inherit target nixUserChrootFlags nix-user-chroot' run; };
97 in makebootstrap {
95 in makebootstrap {
98 startup = ".${script} '\"$@\"'";
96 startup = ".${script} '\"$@\"'";
99 targets = [ "${script}" ] ++ extraTargets;
97 targets = [ "${script}" ] ++ extraTargets;
@@ -110,10 +108,10 @@ in rec {
110 nix-user-chroot'' = targets: nix-user-chroot.overrideDerivation (o: {
108 nix-user-chroot'' = targets: nix-user-chroot.overrideDerivation (o: {
111 buildInputs = o.buildInputs ++ targets;
109 buildInputs = o.buildInputs ++ targets;
112 makeFlags = o.makeFlags ++ [
110 makeFlags = o.makeFlags ++ [
113− ''ENV_PATH="${lib.makeBinPath targets}"''
111+ ''ENV_PATH="${stdenv.lib.makeBinPath targets}"''
114 ];
112 ];
115− }); in { target, extraTargets ? [], run, initScript ? "" }: nix-bootstrap {
113+ }); in { target, extraTargets ? [], run }: nix-bootstrap {
116− inherit target extraTargets run initScript;
114+ inherit target extraTargets run;
117 nix-user-chroot' = nix-user-chroot'' extraTargets;
115 nix-user-chroot' = nix-user-chroot'' extraTargets;
118 };
116 };
119}
117}