mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
Merge remote-tracking branch 'origin/master' into flakes
This commit is contained in:
commit
f443d5ca19
3 changed files with 25 additions and 8 deletions
|
@ -8,6 +8,14 @@
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
||||||
|
<listitem><para>GNU Autoconf
|
||||||
|
(<link xlink:href="https://www.gnu.org/software/autoconf/"/>)
|
||||||
|
and the autoconf-archive macro collection
|
||||||
|
(<link xlink:href="https://www.gnu.org/software/autoconf-archive/"/>).
|
||||||
|
These are only needed to run the bootstrap script, and are not necessary
|
||||||
|
if your source distribution came with a pre-built
|
||||||
|
<literal>./configure</literal> script.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>GNU Make.</para></listitem>
|
<listitem><para>GNU Make.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Bash Shell. The <literal>./configure</literal> script
|
<listitem><para>Bash Shell. The <literal>./configure</literal> script
|
||||||
|
|
|
@ -88,7 +88,7 @@ poly_configure_nix_daemon_service() {
|
||||||
systemctl start nix-daemon.socket
|
systemctl start nix-daemon.socket
|
||||||
|
|
||||||
_sudo "to start the nix-daemon.service" \
|
_sudo "to start the nix-daemon.service" \
|
||||||
systemctl start nix-daemon.service
|
systemctl restart nix-daemon.service
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,11 @@ static void _main(int argc, char * * argv)
|
||||||
std::string outLink = "./result";
|
std::string outLink = "./result";
|
||||||
|
|
||||||
// List of environment variables kept for --pure
|
// List of environment variables kept for --pure
|
||||||
std::set<string> keepVars{"HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL", "TZ", "PAGER", "NIX_BUILD_SHELL", "SHLVL"};
|
std::set<string> keepVars{
|
||||||
|
"HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM",
|
||||||
|
"IN_NIX_SHELL", "TZ", "PAGER", "NIX_BUILD_SHELL", "SHLVL",
|
||||||
|
"http_proxy", "https_proxy", "ftp_proxy", "all_proxy", "no_proxy"
|
||||||
|
};
|
||||||
|
|
||||||
Strings args;
|
Strings args;
|
||||||
for (int i = 1; i < argc; ++i)
|
for (int i = 1; i < argc; ++i)
|
||||||
|
@ -423,13 +427,18 @@ static void _main(int argc, char * * argv)
|
||||||
lose the current $PATH directories. */
|
lose the current $PATH directories. */
|
||||||
auto rcfile = (Path) tmpDir + "/rc";
|
auto rcfile = (Path) tmpDir + "/rc";
|
||||||
writeFile(rcfile, fmt(
|
writeFile(rcfile, fmt(
|
||||||
(keepTmp ? "" : "rm -rf '%1%'; "s) +
|
R"(_nix_shell_clean_tmpdir() { rm -rf %1%; }; )"s +
|
||||||
|
(keepTmp ?
|
||||||
|
"trap _nix_shell_clean_tmpdir EXIT; "
|
||||||
|
"exitHooks+=(_nix_shell_clean_tmpdir); "
|
||||||
|
"failureHooks+=(_nix_shell_clean_tmpdir); ":
|
||||||
|
"_nix_shell_clean_tmpdir; ") +
|
||||||
(pure ? "" : "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;") +
|
(pure ? "" : "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;") +
|
||||||
"%2%"
|
"%2%"
|
||||||
"dontAddDisableDepTrack=1; "
|
"dontAddDisableDepTrack=1; "
|
||||||
"[ -e $stdenv/setup ] && source $stdenv/setup; "
|
"[ -e $stdenv/setup ] && source $stdenv/setup; "
|
||||||
"%3%"
|
"%3%"
|
||||||
"PATH=\"%4%:$PATH\"; "
|
"PATH=%4%:\"$PATH\"; "
|
||||||
"SHELL=%5%; "
|
"SHELL=%5%; "
|
||||||
"set +e; "
|
"set +e; "
|
||||||
R"s([ -n "$PS1" ] && PS1='\n\[\033[1;32m\][nix-shell:\w]\$\[\033[0m\] '; )s"
|
R"s([ -n "$PS1" ] && PS1='\n\[\033[1;32m\][nix-shell:\w]\$\[\033[0m\] '; )s"
|
||||||
|
@ -438,12 +447,12 @@ static void _main(int argc, char * * argv)
|
||||||
"shopt -u nullglob; "
|
"shopt -u nullglob; "
|
||||||
"unset TZ; %6%"
|
"unset TZ; %6%"
|
||||||
"%7%",
|
"%7%",
|
||||||
(Path) tmpDir,
|
shellEscape(tmpDir),
|
||||||
(pure ? "" : "p=$PATH; "),
|
(pure ? "" : "p=$PATH; "),
|
||||||
(pure ? "" : "PATH=$PATH:$p; unset p; "),
|
(pure ? "" : "PATH=$PATH:$p; unset p; "),
|
||||||
dirOf(*shell),
|
shellEscape(dirOf(*shell)),
|
||||||
*shell,
|
shellEscape(*shell),
|
||||||
(getenv("TZ") ? (string("export TZ='") + getenv("TZ") + "'; ") : ""),
|
(getenv("TZ") ? (string("export TZ=") + shellEscape(getenv("TZ")) + "; ") : ""),
|
||||||
envCommand));
|
envCommand));
|
||||||
|
|
||||||
Strings envStrs;
|
Strings envStrs;
|
||||||
|
|
Loading…
Reference in a new issue