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: 93e8c7ec20a7
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2743bf0bb172
Choose a head ref
Loading
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

custom: https://nixos.org/nixos/foundation.html
3 changes: 2 additions & 1 deletion doc/manual/command-ref/env-common.xml
Original file line number Diff line number Diff line change
@@ -14,7 +14,8 @@
<varlistentry><term><envar>IN_NIX_SHELL</envar></term>

<listitem><para>Indicator that tells if the current environment was set up by
<command>nix-shell</command>.</para></listitem>
<command>nix-shell</command>. Since Nix 2.0 the values are
<literal>"pure"</literal> and <literal>"impure"</literal></para></listitem>

</varlistentry>

22 changes: 20 additions & 2 deletions doc/manual/expressions/language-constructs.xml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ encountered</quote>).</para></footnote>.</para>

<simplesect xml:id="sect-let-expressions"><title>Let-expressions</title>

<para>A let-expression allows you define local variables for an
<para>A let-expression allows you to define local variables for an
expression. For instance,

<programlisting>
@@ -217,7 +217,25 @@ but can also be written as:
ellipsis(<literal>...</literal>) as you can access attribute names as
<literal>a</literal>, using <literal>args.a</literal>, which was given as an
additional attribute to the function.
</para></listitem>
</para>

<warning>
<para>
The <literal>args@</literal> expression is bound to the argument passed to the function which
means that attributes with defaults that aren't explicitly specified in the function call
won't cause an evaluation error, but won't exist in <literal>args</literal>.
</para>
<para>
For instance
<programlisting>
let
function = args@{ a ? 23, ... }: args;
in
function {}
</programlisting>
will evaluate to an empty attribute set.
</para>
</warning></listitem>

</itemizedlist>

2 changes: 1 addition & 1 deletion release-common.nix
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ rec {
libxml2
libxslt
docbook5
docbook5_xsl
docbook_xsl_ns
autoconf-archive
autoreconfHook
];
2 changes: 1 addition & 1 deletion release.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ nix ? builtins.fetchGit ./.
, nixpkgs ? builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-19.03"; }
, nixpkgs ? builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz
, officialRelease ? false
, systems ? [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ]
}:
8 changes: 4 additions & 4 deletions scripts/install.in
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ cleanup() {
trap cleanup EXIT INT QUIT TERM

require_util() {
type "$1" > /dev/null 2>&1 || command -v "$1" > /dev/null 2>&1 ||
command -v "$1" > /dev/null 2>&1 ||
oops "you do not have '$1' installed, which I need to $2"
}

@@ -41,11 +41,11 @@ require_util tar "unpack the binary tarball"
echo "downloading Nix @nixVersion@ binary tarball for $system from '$url' to '$tmpDir'..."
curl -L "$url" -o "$tarball" || oops "failed to download '$url'"

if type sha256sum > /dev/null 2>&1; then
if command -v sha256sum > /dev/null 2>&1; then
hash2="$(sha256sum -b "$tarball" | cut -c1-64)"
elif type shasum > /dev/null 2>&1; then
elif command -v shasum > /dev/null 2>&1; then
hash2="$(shasum -a 256 -b "$tarball" | cut -c1-64)"
elif type openssl > /dev/null 2>&1; then
elif command -v openssl > /dev/null 2>&1; then
hash2="$(openssl dgst -r -sha256 "$tarball" | cut -c1-64)"
else
oops "cannot verify the SHA-256 hash of '$url'; you need one of 'shasum', 'sha256sum', or 'openssl'"
6 changes: 0 additions & 6 deletions scripts/nix-profile-daemon.sh.in
Original file line number Diff line number Diff line change
@@ -2,12 +2,6 @@
if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi
__ETC_PROFILE_NIX_SOURCED=1

# Set up secure multi-user builds: non-root users build through the
# Nix daemon.
if [ "$USER" != root -o ! -w @localstatedir@/nix/db ]; then
export NIX_REMOTE=daemon
fi

export NIX_USER_PROFILE_DIR="@localstatedir@/nix/profiles/per-user/$USER"
export NIX_PROFILES="@localstatedir@/nix/profiles/default $HOME/.nix-profile"

4 changes: 2 additions & 2 deletions scripts/nix-profile.sh.in
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then

# Set up environment.
# This part should be kept in sync with nixpkgs:nixos/modules/programs/environment.nix
NIX_PROFILES="@localstatedir@/nix/profiles/default $NIX_USER_PROFILE_DIR"
export NIX_PROFILES="@localstatedir@/nix/profiles/default $HOME/.nix-profile"

# Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work.
if [ -e /etc/ssl/certs/ca-certificates.crt ]; then # NixOS, Ubuntu, Debian, Gentoo, Arch
@@ -79,5 +79,5 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
fi

export PATH="$NIX_LINK/bin:$__savedpath"
unset __savedpath NIX_LINK NIX_USER_PROFILE_DIR NIX_PROFILES
unset __savedpath NIX_LINK NIX_USER_PROFILE_DIR
fi
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ useClang ? false }:

with import (builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-19.03"; }) {};
with import (builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz) {};

with import ./release-common.nix { inherit pkgs; };

Loading