aboutsummaryrefslogtreecommitdiff
path: root/src/nix/run.cc
AgeCommit message (Collapse)Author
2018-08-19nix run: Restore CPU affinityEelco Dolstra
Fixes #2359.
2018-08-09nix run: Respect propagated-user-env-packagesEelco Dolstra
Also, add $path/bin to $PATH even if it doesn't exist. This makes 'man' work properly (since it looks for ../share/man relative to $PATH entries).
2018-02-26nix run: Fix segfault on macOSEelco Dolstra
Note that clearenv() is not available on macOS. Fixes #1907.
2018-02-19Update release notesEelco Dolstra
Also add some examples to nix --help.
2017-11-20nix run: Fix "flag '--command' requires 2 argument(s)"Eelco Dolstra
2017-11-20nix run: Fix accidental removal of /nix/store existence checkEelco Dolstra
Parenthetical to #1686, we don't need to create a new root if we can just bind-mount on top of the existing /nix/store.
2017-11-20nix run: Ignore non-directories while setting up the chrootEelco Dolstra
Fixes #1686.
2017-10-24nix: Respect -I, --arg, --argstrEelco Dolstra
Also, random cleanup to argument handling.
2017-09-28nix run: Restore signalsEelco Dolstra
Otherwise Ctrl-C doesn't work.
2017-09-10nix build: Only download the requested derivation outputsEelco Dolstra
Also some refactoring.
2017-09-07nix run: Add some examplesEelco Dolstra
2017-09-06nix build: Add --out-link and --no-link optionsEelco Dolstra
2017-08-31More macOS build fixesEelco Dolstra
2017-08-31Fix build failure on non-LinuxEelco Dolstra
https://hydra.nixos.org/build/59649086
2017-08-29nix run: Flush the progress bar before starting the commandEelco Dolstra
2017-08-29nix run: Add some flags for clearing/keeping the environmentEelco Dolstra
This is useful for testing commands in isolation. For example, $ nix run nixpkgs.geeqie -i -k DISPLAY -k XAUTHORITY -c geeqie runs geeqie in an empty environment, except for $DISPLAY and $XAUTHORITY.
2017-08-29nix run: Allow passing a command to executeEelco Dolstra
E.g. nix run nixpkgs.hello -c hello --greeting Hallo Note that unlike "nix-shell --command", no quoting of arguments is necessary. "-c" (short for "--command") cannot be combined with "--" because they both consume all remaining arguments. But since installables shouldn't start with a dash, this is unlikely to cause problems.
2017-08-29nix run: Fix chroot executionEelco Dolstra
Running "nix run" with a diverted store, e.g. $ nix run --store local?root=/tmp/nix nixpkgs.hello stopped working when Nix became multithreaded, because unshare(CLONE_NEWUSER) doesn't work in multithreaded processes. The obvious solution is to terminate all other threads first, but 1) there is no way to terminate Boehm GC marker threads; and 2) it appears that the kernel has a race where unshare(CLONE_NEWUSER) will still fail for some indeterminate amount of time after joining other threads. So instead, "nix run" will now exec() a single-threaded helper ("nix __run_in_chroot") that performs the actual unshare()/chroot()/exec().
2017-07-30Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-14StorePathsCommand: Don't build installablesEelco Dolstra
On second though this was annoying. E.g. "nix log nixpkgs.hello" would build/download Hello first, even though the log can be fetched directly from the binary cache. May need to revisit this.
2017-04-25StorePathCommands: Build installablesEelco Dolstra
So for instance "nix copy --to ... nixpkgs.hello" will build nixpkgs.hello first. It's debatable whether this is a good idea. It seems desirable for commands like "nix copy" but maybe not for commands like "nix path-info".
2017-04-25Move code aroundEelco Dolstra
2017-04-25Restructure installables handling in the "nix" commandEelco Dolstra
2016-11-26Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25Get rid of unicode quotes (#1140)Guillaume Maudoux
2016-06-02nix run: Set a reasonable uid/gidEelco Dolstra
2016-06-02nix run: Handle the case where the /nix/store mount point doesn't existEelco Dolstra
2016-06-02nix run: Mount the Nix store in a private namespaceEelco Dolstra
This is a convenience command to allow users who are not privileged to create /nix/store to use Nix with regular binary caches. For example, $ NIX_REMOTE="local?state=$HOME/nix/var&real=/$HOME/nix/store" nix run firefox bashInteractive will download Firefox and bash from cache.nixos.org, then start a shell in which $HOME/nix/store is mounted on /nix/store.
2016-06-02Add basic "nix run" commandEelco Dolstra