Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.3.1
Choose a head ref

Commits on Sep 4, 2019

  1. Tweak release notes

    edolstra committed Sep 4, 2019
    Copy the full SHA
    22d4ea7 View commit details

Commits on Oct 9, 2019

  1. getSourceExpr(): Handle channels

    Fixes #1892.
    Fixes #1865.
    Fixes #3119.
    
    (cherry picked from commit e6e61f0)
    edolstra committed Oct 9, 2019
    1
    Copy the full SHA
    1d5cb6a View commit details
  2. nix search: Don't quietly ignore errors

    (cherry picked from commit 7c74f07)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    1b78bbb View commit details
  3. Handle empty sandbox_shell

    Previously, SANDBOX_SHELL was set to empty when unavailable. This
    caused issues when actually generating the sandbox. Instead, just set
    SANDBOX_SHELL when --with-sandbox-shell= is non-empty. Alternative
    implementation to #3038.
    
    (cherry picked from commit 199e888)
    matthewbauer authored and edolstra committed Oct 9, 2019
    Copy the full SHA
    9f698c4 View commit details
  4. Fix typos in the Nix Manual.

    (cherry picked from commit 00a5675)
    PyroLagus authored and edolstra committed Oct 9, 2019
    Copy the full SHA
    3c5788d View commit details
  5. nix search: remove verbose example

    (cherry picked from commit 6f6cb5e)
    samdoshi authored and edolstra committed Oct 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b0ae8fe View commit details
  6. Fix fetchTarball with chroot stores

    Fixes #2405.
    
    (cherry picked from commit 168a887)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    3919093 View commit details
  7. Update garbage-collection.xml readability

    1. remove a typo space
    2. Simplify negative style by using affirmative style
    
    (cherry picked from commit 10bfc5c)
    JosephLucas authored and edolstra committed Oct 9, 2019
    Copy the full SHA
    4d83eb6 View commit details
  8. Shut up some warnings

    (cherry picked from commit 99e8e58)
    (cherry picked from commit 3a022d4)
    edolstra committed Oct 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9f53bc3 View commit details
  9. Don't catch exceptions by value

    (cherry picked from commit 893be6f)
    (cherry picked from commit bd79c1f)
    edolstra committed Oct 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f3ce445 View commit details
  10. libstore: don't forward --show-trace

    (cherry picked from commit e63c9e7)
    zimbatm authored and edolstra committed Oct 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f4106e7 View commit details
  11. Move 'builtins.splitVersion' to position respecting alphabetical order

    (cherry picked from commit 9533d85)
    alexfmpe authored and edolstra committed Oct 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    62d1c60 View commit details
  12. docs: Use the explicit ref for fetchGit with a tag

    With the merge of #2582, the syntax "tags/1.9" for refs does not work
    anymore.
    However, the new syntax "refs/tags/1.9" seems to support annotated tags,
    such as "refs/tags/2.0".
    
    Closes #2385.
    
    (cherry picked from commit ae244af)
    jtanguy authored and edolstra committed Oct 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ceddbc9 View commit details
  13. docs: Fix a typo in github in an example

    (cherry picked from commit 92ede15)
    jtanguy authored and edolstra committed Oct 9, 2019
    Copy the full SHA
    ff7fcd3 View commit details
  14. Disable OpenSSL lock callback on OpenSSL >= 1.1.1

    (cherry picked from commit a56b51a)
    edolstra committed Oct 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fa02819 View commit details
  15. docs: Note that tryEval doesn't do deep evaluation

    (cherry picked from commit e4ea3e0)
    infinisil authored and edolstra committed Oct 9, 2019
    Copy the full SHA
    7c9ad4d View commit details
  16. Bump version number

    edolstra committed Oct 9, 2019
    Copy the full SHA
    e232bf2 View commit details
  17. Filter ANSI escape sequences in -L output

    Otherwise, builds like NixOS VM tests may leave the terminal in a
    weird state and do resets.
    
    (cherry picked from commit 4331eeb)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    910b0fc View commit details
  18. Remove world-writability from per-user directories

    'nix-daemon' now creates subdirectories for users when they first
    connect.
    
    Fixes #509 (CVE-2019-17365).
    Should also fix #3127.
    
    (cherry picked from commit 5a30309)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    6595378 View commit details
  19. Remove some redundant initialization

    (cherry picked from commit c43d9f6)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    923b6bd View commit details
  20. nix-profile.sh: Don't create .nix-channels

    This is already done by the installer, so no need to do it again.
    
    (cherry picked from commit 26762ce)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    2522757 View commit details
  21. nix-profile.sh: Remove coreutils dependency

    (cherry picked from commit 61a6176)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    1c10f73 View commit details
  22. Go back to 755 permission on per-user directories

    700 is pointless since the store is world-readable anyway. And
    per-user/root/channels must be world-readable.
    
    (cherry picked from commit d7bae56)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    7c45898 View commit details
  23. Typo

    (cherry picked from commit 9277e72)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    fe51fba View commit details
  24. Force per-user group to a known value

    (cherry picked from commit 20eec80)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    2070d55 View commit details
  25. nix-env: Create ~/.nix-profile automatically

    (cherry picked from commit 9348f92)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    f66108f View commit details
  26. nix-env: Create ~/.nix-defexpr automatically

    (cherry picked from commit c9159f8)
    edolstra committed Oct 9, 2019
    Copy the full SHA
    0fb4744 View commit details
  27. Doh

    edolstra committed Oct 9, 2019
    Copy the full SHA
    e3d44a3 View commit details

Commits on Oct 10, 2019

  1. Copy the full SHA
    21f48ff View commit details
  2. nix verify: Fix uninitialized variable

    (cherry picked from commit 95cf23e)
    edolstra committed Oct 10, 2019
    Copy the full SHA
    61e8162 View commit details
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3
2.3.1
2 changes: 1 addition & 1 deletion doc/manual/command-ref/conf-file.xml
Original file line number Diff line number Diff line change
@@ -433,7 +433,7 @@ builtins.fetchurl {
<varlistentry xml:id="conf-keep-env-derivations"><term><literal>keep-env-derivations</literal></term>

<listitem><para>If <literal>false</literal> (default), derivations
are not stored in Nix user environments. That is, the derivation
are not stored in Nix user environments. That is, the derivations of
any build-time-only dependencies may be garbage-collected.</para>

<para>If <literal>true</literal>, when you add a Nix derivation to
2 changes: 1 addition & 1 deletion doc/manual/command-ref/nix-env.xml
Original file line number Diff line number Diff line change
@@ -659,7 +659,7 @@ upgrading `mozilla-1.2' to `mozilla-1.4'</screen>
<literal>gcc-3.3.1</literal> are split into two parts: the package
name (<literal>gcc</literal>), and the version
(<literal>3.3.1</literal>). The version part starts after the first
dash not following by a letter. <varname>x</varname> is considered an
dash not followed by a letter. <varname>x</varname> is considered an
upgrade of <varname>y</varname> if their package names match, and the
version of <varname>y</varname> is higher that that of
<varname>x</varname>.</para>
2 changes: 1 addition & 1 deletion doc/manual/command-ref/nix-prefetch-url.xml
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ avoided.</para>
<para>If <replaceable>hash</replaceable> is specified, then a download
is not performed if the Nix store already contains a file with the
same hash and base name. Otherwise, the file is downloaded, and an
error if signaled if the actual hash of the file does not match the
error is signaled if the actual hash of the file does not match the
specified hash.</para>

<para>This command prints the hash on standard output. Additionally,
46 changes: 25 additions & 21 deletions doc/manual/expressions/builtins.xml
Original file line number Diff line number Diff line change
@@ -170,18 +170,6 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
</varlistentry>


<varlistentry xml:id='builtin-splitVersion'>
<term><function>builtins.splitVersion</function>
<replaceable>s</replaceable></term>

<listitem><para>Split a string representing a version into its
components, by the same version splitting logic underlying the
version comparison in <link linkend="ssec-version-comparisons">
<command>nix-env -u</command></link>.</para></listitem>

</varlistentry>


<varlistentry xml:id='builtin-concatLists'>
<term><function>builtins.concatLists</function>
<replaceable>lists</replaceable></term>
@@ -301,7 +289,7 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>

<listitem><para>Return element <replaceable>n</replaceable> from
the list <replaceable>xs</replaceable>. Elements are counted
starting from 0. A fatal error occurs in the index is out of
starting from 0. A fatal error occurs if the index is out of
bounds.</para></listitem>

</varlistentry>
@@ -448,7 +436,7 @@ stdenv.mkDerivation { … }
<example>
<title>Fetching an arbitrary ref</title>
<programlisting>builtins.fetchGit {
url = "https://gitub.com/NixOS/nix.git";
url = "https://github.com/NixOS/nix.git";
ref = "refs/heads/0.5-release";
}</programlisting>
</example>
@@ -499,11 +487,8 @@ stdenv.mkDerivation { … }
<title>Fetching a tag</title>
<programlisting>builtins.fetchGit {
url = "https://github.com/nixos/nix.git";
ref = "tags/1.9";
ref = "refs/tags/1.9";
}</programlisting>
<note><para>Due to a bug (<link
xlink:href="https://github.com/NixOS/nix/issues/2385">#2385</link>),
only non-annotated tags can be fetched.</para></note>
</example>

<example>
@@ -1275,6 +1260,19 @@ Evaluates to <literal>[ " " [ "FOO" ] " " ]</literal>.
</para></listitem>
</varlistentry>


<varlistentry xml:id='builtin-splitVersion'>
<term><function>builtins.splitVersion</function>
<replaceable>s</replaceable></term>

<listitem><para>Split a string representing a version into its
components, by the same version splitting logic underlying the
version comparison in <link linkend="ssec-version-comparisons">
<command>nix-env -u</command></link>.</para></listitem>

</varlistentry>


<varlistentry xml:id='builtin-stringLength'>
<term><function>builtins.stringLength</function>
<replaceable>e</replaceable></term>
@@ -1468,7 +1466,7 @@ in foo</programlisting>
<listitem><para>A set containing <literal>{ __toString = self: ...; }</literal>.</para></listitem>
<listitem><para>An integer.</para></listitem>
<listitem><para>A list, in which case the string representations of its elements are joined with spaces.</para></listitem>
<listitem><para>A Boolean (<literal>false</literal> yields <literal>""</literal>, <literal>true</literal> yields <literal>"1"</literal>.</para></listitem>
<listitem><para>A Boolean (<literal>false</literal> yields <literal>""</literal>, <literal>true</literal> yields <literal>"1"</literal>).</para></listitem>
<listitem><para><literal>null</literal>, which yields the empty string.</para></listitem>
</itemizedlist>
</listitem>
@@ -1607,12 +1605,18 @@ stdenv.mkDerivation (rec {
<term><function>builtins.tryEval</function>
<replaceable>e</replaceable></term>

<listitem><para>Try to evaluate <replaceable>e</replaceable>.
<listitem><para>Try to shallowly evaluate <replaceable>e</replaceable>.
Return a set containing the attributes <literal>success</literal>
(<literal>true</literal> if <replaceable>e</replaceable> evaluated
successfully, <literal>false</literal> if an error was thrown) and
<literal>value</literal>, equalling <replaceable>e</replaceable>
if successful and <literal>false</literal> otherwise.
if successful and <literal>false</literal> otherwise. Note that this
doesn't evaluate <replaceable>e</replaceable> deeply, so
<literal>let e = { x = throw ""; }; in (builtins.tryEval e).success
</literal> will be <literal>true</literal>. Using <literal>builtins.deepSeq
</literal> one can get the expected result: <literal>let e = { x = throw "";
}; in (builtins.tryEval (builtins.deepSeq e e)).success</literal> will be
<literal>false</literal>.
</para></listitem>

</varlistentry>
2 changes: 1 addition & 1 deletion doc/manual/expressions/simple-building-testing.xml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ use <command>nix-build</command>’s <option
linkend='opt-out-link'>-o</option> switch to give the symlink another
name.</para>

<para>Nix has a transactional semantics. Once a build finishes
<para>Nix has transactional semantics. Once a build finishes
successfully, Nix makes a note of this in its database: it registers
that the path denoted by <envar>out</envar> is now
<quote>valid</quote>. If you try to build the derivation again, Nix
11 changes: 6 additions & 5 deletions doc/manual/packages/garbage-collection.xml
Original file line number Diff line number Diff line change
@@ -52,12 +52,13 @@ garbage collector as follows:
<screen>
$ nix-store --gc</screen>

The behaviour of the gargage collector is affected by the <literal>keep-
derivations</literal> (default: true) and <literal>keep-outputs</literal>
The behaviour of the gargage collector is affected by the
<literal>keep-derivations</literal> (default: true) and <literal>keep-outputs</literal>
(default: false) options in the Nix configuration file. The defaults will ensure
that all derivations that are not build-time dependencies of garbage collector roots
will be collected but that all output paths that are not runtime dependencies
will be collected. (This is usually what you want, but while you are developing
that all derivations that are build-time dependencies of garbage collector roots
will be kept and that all output paths that are runtime dependencies
will be kept as well. All other derivations or paths will be collected.
(This is usually what you want, but while you are developing
it may make sense to keep outputs to ensure that rebuild times are quick.)

If you are feeling uncertain, you can also first view what files would
11 changes: 5 additions & 6 deletions doc/manual/release-notes/rl-2.3.xml
Original file line number Diff line number Diff line change
@@ -13,9 +13,8 @@ incompatible changes:</para>

<listitem>
<para>Nix now uses BSD file locks instead of POSIX file
locks. Since previous releases used POSIX file locks, you should
not use Nix 2.2 and previous releases at the same time on a Nix
store.</para>
locks. Because of this, you should not use Nix 2.3 and previous
releases at the same time on a Nix store.</para>
</listitem>

</itemizedlist>
@@ -47,17 +46,17 @@ incompatible changes:</para>
</listitem>

<listitem>
<para><command>nix</command>: Add
<para>The <command>nix</command> command has a new
<option>--print-build-logs</option> (<option>-L</option>) flag to
print build log output to stderr rather than showing the last log
print build log output to stderr, rather than showing the last log
line in the progress bar. To distinguish between concurrent
builds, log lines are prefixed by the name of the package.
</para>
</listitem>

<listitem>
<para>Builds are now executed in a pseudo-terminal, and the
<envar>TERM</envar> evnironment variable is set to
<envar>TERM</envar> environment variable is set to
<literal>xterm-256color</literal>. This allows many programs
(e.g. <command>gcc</command>, <command>clang</command>,
<command>cmake</command>) to print colorized log output.</para>
2 changes: 1 addition & 1 deletion nix.spec.in
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ chmod 1775 $RPM_BUILD_ROOT/nix/store
for d in profiles gcroots;
do
mkdir -p $RPM_BUILD_ROOT/nix/var/nix/$d/per-user
chmod 1777 $RPM_BUILD_ROOT/nix/var/nix/$d/per-user
chmod 755 $RPM_BUILD_ROOT/nix/var/nix/$d/per-user
done

# fix permission of nix profile
17 changes: 5 additions & 12 deletions scripts/install-multi-user.sh
Original file line number Diff line number Diff line change
@@ -529,24 +529,17 @@ create_build_users() {
}

create_directories() {
# FIXME: remove all of this because it duplicates LocalStore::LocalStore().

_sudo "to make the basic directory structure of Nix (part 1)" \
mkdir -pv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix{,/db,/gcroots,/profiles,/temproots,/userpool}
mkdir -pv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix{,/db,/gcroots,/profiles,/temproots,/userpool} /nix/var/nix/{gcroots,profiles}/per-user

_sudo "to make the basic directory structure of Nix (part 2)" \
mkdir -pv -m 1777 /nix/var/nix/{gcroots,profiles}/per-user

_sudo "to make the basic directory structure of Nix (part 3)" \
mkdir -pv -m 1775 /nix/store

_sudo "to make the basic directory structure of Nix (part 4)" \
_sudo "to make the basic directory structure of Nix (part 3)" \
chgrp "$NIX_BUILD_GROUP_NAME" /nix/store

_sudo "to set up the root user's profile (part 1)" \
mkdir -pv -m 0755 /nix/var/nix/profiles/per-user/root

_sudo "to set up the root user's profile (part 2)" \
mkdir -pv -m 0700 "$ROOT_HOME/.nix-defexpr"

_sudo "to place the default nix daemon configuration (part 1)" \
mkdir -pv -m 0555 /etc/nix
}
@@ -589,7 +582,7 @@ EOF
We will:
- make sure your computer doesn't already have Nix files
(if it does, I will tell you how to clean them up.)
(if it does, I will tell you how to clean them up.)
- create local users (see the list above for the users we'll make)
- create a local group ($NIX_BUILD_GROUP_NAME)
- install Nix in to $NIX_ROOT
39 changes: 0 additions & 39 deletions scripts/nix-profile-daemon.sh.in
Original file line number Diff line number Diff line change
@@ -5,45 +5,6 @@ __ETC_PROFILE_NIX_SOURCED=1
export NIX_USER_PROFILE_DIR="@localstatedir@/nix/profiles/per-user/$USER"
export NIX_PROFILES="@localstatedir@/nix/profiles/default $HOME/.nix-profile"

# Set up the per-user profile.
mkdir -m 0755 -p $NIX_USER_PROFILE_DIR
if ! test -O "$NIX_USER_PROFILE_DIR"; then
echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR" >&2
fi

if test -w $HOME; then
if ! test -L $HOME/.nix-profile; then
if test "$USER" != root; then
ln -s $NIX_USER_PROFILE_DIR/profile $HOME/.nix-profile
else
# Root installs in the system-wide profile by default.
ln -s @localstatedir@/nix/profiles/default $HOME/.nix-profile
fi
fi

# Subscribe the root user to the NixOS channel by default.
if [ "$USER" = root -a ! -e $HOME/.nix-channels ]; then
echo "https://nixos.org/channels/nixpkgs-unstable nixpkgs" > $HOME/.nix-channels
fi

# Create the per-user garbage collector roots directory.
NIX_USER_GCROOTS_DIR=@localstatedir@/nix/gcroots/per-user/$USER
mkdir -m 0755 -p $NIX_USER_GCROOTS_DIR
if ! test -O "$NIX_USER_GCROOTS_DIR"; then
echo "WARNING: bad ownership on $NIX_USER_GCROOTS_DIR" >&2
fi

# Set up a default Nix expression from which to install stuff.
if [ ! -e $HOME/.nix-defexpr -o -L $HOME/.nix-defexpr ]; then
rm -f $HOME/.nix-defexpr
mkdir -p $HOME/.nix-defexpr
if [ "$USER" != root ]; then
ln -s @localstatedir@/nix/profiles/per-user/root/channels $HOME/.nix-defexpr/channels_root
fi
fi
fi


# Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work.
if [ ! -z "${NIX_SSL_CERT_FILE:-}" ]; then
: # Allow users to override the NIX_SSL_CERT_FILE
48 changes: 2 additions & 46 deletions scripts/nix-profile.sh.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
if [ -n "$HOME" ] && [ -n "$USER" ]; then
__savedpath="$PATH"
export PATH=@coreutils@

# Set up the per-user profile.
# This part should be kept in sync with nixpkgs:nixos/modules/programs/shell.nix
@@ -9,48 +7,6 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then

NIX_USER_PROFILE_DIR=@localstatedir@/nix/profiles/per-user/$USER

mkdir -m 0755 -p "$NIX_USER_PROFILE_DIR"

if [ "$(stat --printf '%u' "$NIX_USER_PROFILE_DIR")" != "$(id -u)" ]; then
echo "Nix: WARNING: bad ownership on "$NIX_USER_PROFILE_DIR", should be $(id -u)" >&2
fi

if [ -w "$HOME" ]; then
if ! [ -L "$NIX_LINK" ]; then
echo "Nix: creating $NIX_LINK" >&2
if [ "$USER" != root ]; then
if ! ln -s "$NIX_USER_PROFILE_DIR"/profile "$NIX_LINK"; then
echo "Nix: WARNING: could not create $NIX_LINK -> $NIX_USER_PROFILE_DIR/profile" >&2
fi
else
# Root installs in the system-wide profile by default.
ln -s @localstatedir@/nix/profiles/default "$NIX_LINK"
fi
fi

# Subscribe the user to the unstable Nixpkgs channel by default.
if [ ! -e "$HOME/.nix-channels" ]; then
echo "https://nixos.org/channels/nixpkgs-unstable nixpkgs" > "$HOME/.nix-channels"
fi

# Create the per-user garbage collector roots directory.
__user_gcroots=@localstatedir@/nix/gcroots/per-user/"$USER"
mkdir -m 0755 -p "$__user_gcroots"
if [ "$(stat --printf '%u' "$__user_gcroots")" != "$(id -u)" ]; then
echo "Nix: WARNING: bad ownership on $__user_gcroots, should be $(id -u)" >&2
fi
unset __user_gcroots

# Set up a default Nix expression from which to install stuff.
__nix_defexpr="$HOME"/.nix-defexpr
[ -L "$__nix_defexpr" ] && rm -f "$__nix_defexpr"
mkdir -m 0755 -p "$__nix_defexpr"
if [ "$USER" != root ] && [ ! -L "$__nix_defexpr"/channels_root ]; then
ln -s @localstatedir@/nix/profiles/per-user/root/channels "$__nix_defexpr"/channels_root
fi
unset __nix_defexpr
fi

# Append ~/.nix-defexpr/channels to $NIX_PATH so that <nixpkgs>
# paths work when the user has fetched the Nixpkgs channel.
export NIX_PATH=${NIX_PATH:+$NIX_PATH:}$HOME/.nix-defexpr/channels
@@ -78,6 +34,6 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
export MANPATH="$NIX_LINK/share/man:$MANPATH"
fi

export PATH="$NIX_LINK/bin:$__savedpath"
unset __savedpath NIX_LINK NIX_USER_PROFILE_DIR
export PATH="$NIX_LINK/bin:$PATH"
unset NIX_LINK NIX_USER_PROFILE_DIR
fi
4 changes: 2 additions & 2 deletions src/libexpr/json-to-value.cc
Original file line number Diff line number Diff line change
@@ -111,9 +111,9 @@ static void parseJSON(EvalState & state, const char * & s, Value & v)
mkFloat(v, stod(tmp_number));
else
mkInt(v, stol(tmp_number));
} catch (std::invalid_argument e) {
} catch (std::invalid_argument & e) {
throw JSONParseError("invalid JSON number");
} catch (std::out_of_range e) {
} catch (std::out_of_range & e) {
throw JSONParseError("out-of-range JSON number");
}
}
6 changes: 3 additions & 3 deletions src/libexpr/primops.cc
Original file line number Diff line number Diff line change
@@ -2089,12 +2089,12 @@ void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
if (evalSettings.pureEval && !request.expectedHash)
throw Error("in pure evaluation mode, '%s' requires a 'sha256' argument", who);

Path res = getDownloader()->downloadCached(state.store, request).path;
auto res = getDownloader()->downloadCached(state.store, request);

if (state.allowedPaths)
state.allowedPaths->insert(res);
state.allowedPaths->insert(res.path);

mkString(v, res, PathSet({res}));
mkString(v, res.storePath, PathSet({res.storePath}));
}


2 changes: 1 addition & 1 deletion src/libexpr/primops/fetchGit.cc
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ GitInfo exportGit(ref<Store> store, const std::string & uri,

try {
runProgram("git", true, { "-C", uri, "diff-index", "--quiet", "HEAD", "--" });
} catch (ExecError e) {
} catch (ExecError & e) {
if (!WIFEXITED(e.status) || WEXITSTATUS(e.status) != 1) throw;
clean = false;
}
Loading