From ed59bf7a181bb382dea7dd72da52bf91f60deb8d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 23 Jul 2012 17:11:12 -0400 Subject: nix-build: Support the ‘-’ argument to build an expression from stdin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/nix-build.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/nix-build.in b/scripts/nix-build.in index 35b186bb715d..afe0679a47d3 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -118,6 +118,10 @@ EOF elsif ($arg eq "--show-trace") { push @instArgs, $arg; } + + elsif ($arg eq "-") { + @exprs = ("-"); + } elsif ($arg eq "--verbose" or substr($arg, 0, 2) eq "-v") { push @buildArgs, $arg; -- cgit 1.4.1 From 477b0fbeca62bf1957bc0aad26f1a844ebd22231 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 25 Jul 2012 16:56:56 -0400 Subject: Subscribe to the Nixpkgs rather than NixOS channel --- scripts/nix-profile.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in index d343385cc1e5..b18069d9408b 100644 --- a/scripts/nix-profile.sh.in +++ b/scripts/nix-profile.sh.in @@ -19,9 +19,9 @@ fi export PATH="$HOME/.nix-profile/bin:$PATH" -# Subscribe the root user to the NixOS channel by default. +# Subscribe the root user to the Nixpkgs channel by default. if [ "$USER" = root -a ! -e $HOME/.nix-channels ]; then - echo "http://nixos.org/releases/nixos/channels/nixos-unstable nixos" > $HOME/.nix-channels + echo "http://nixos.org/releases/nixos/channels/nixpkgs-unstable nixpkgs" > $HOME/.nix-channels fi # Create the per-user garbage collector roots directory. -- cgit 1.4.1 From 2605f4f4e6a367df67bf8b33b252c350313699c9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 25 Jul 2012 17:06:09 -0400 Subject: nix-profile.sh: Don't set NIX_REMOTE on single user installations Commit 6a214f3e06fa1c5f0a4d40e555f14d87691af297 reused the NixOS environment initialisation for nix-profile.sh, but this is inappropriate on systems that don't have multi-user support enabled. --- scripts/nix-profile.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in index b18069d9408b..bc3dc719eb6f 100644 --- a/scripts/nix-profile.sh.in +++ b/scripts/nix-profile.sh.in @@ -43,7 +43,7 @@ fi # Set up secure multi-user builds: non-root users build through the # Nix daemon. -if test "$USER" != root; then +if [ "$USER" != root -a -e @localstatedir@/nix/daemon-socket/socket ]; then export NIX_REMOTE=daemon else unset NIX_REMOTE -- cgit 1.4.1