about summary refs log tree commit diff
path: root/src/nix
AgeCommit message (Collapse)AuthorFilesLines
2019-03-24 repl: Restore CTRL-C behaviourxbreak1-0/+40
Install signal handler during `readline` to handle SIGINT to abort partially typed expressions.
2019-03-14 experimental/optional -> optionalEelco Dolstra1-1/+1
2019-02-05 Revert "Restore parent mount namespace before executing a child process"Eelco Dolstra3-9/+2
This reverts commit a0ef21262f4d5652bfb65cfacaec01d89c475a93. This doesn't work in 'nix run' and nix-shell because setns() fails in multithreaded programs, and Boehm GC mark threads are uncancellable. Fixes #2646.
2019-01-10 Merge pull request #2617 from veprbl/pr/V547_nix_repl.ccEelco Dolstra1-18/+1
remove some dead code in nix/repl.cc
2019-01-05 Remove mentions of `libformat`, it no longer existsJohn Ericson1-1/+1
2018-12-25 remove some dead code in nix/repl.ccDmitry Kalinkin1-18/+1
Fixes a static analyzer warning: Expression 'isDrv' is always false. Fixes: 3beb6f6e7 ('Show derivations more concisely')
2018-12-13 Support SRI hashesEelco Dolstra1-9/+14
SRI hashes (https://www.w3.org/TR/SRI/) combine the hash algorithm and a base-64 hash. This allows more concise and standard hash specifications. For example, instead of import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; sha256 = "5d22dad058d5c800d65a115f919da22938c50dd6ba98c5e3a183172d149840a4"; }; you can write import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; hash = "sha256-XSLa0FjVyADWWhFfkZ2iKTjFDda6mMXjoYMXLRSYQKQ="; }; In fixed-output derivations, the outputHashAlgo is no longer mandatory if outputHash specifies the hash (either as an SRI or in the old "<type>:<hash>" format). 'nix hash-{file,path}' now print hashes in SRI format by default. I also reverted them to use SHA-256 by default because that's what we're using most of the time in Nixpkgs. Suggested by @zimbatm.
2018-12-12 nix repl: don't create result symlinksDaiderd Jordan1-1/+1
2018-11-20 repl: give user the choice between libeditline and libreadlineKai Harries1-0/+9
The goal is to support libeditline AND libreadline and let the user decide at compile time which one to use. Add a compile time option to use libreadline instead of libeditline. If compiled against libreadline completion functionality is lost because of a incompatibility between libeditlines and libreadlines completion function. Completion with libreadline is possible and can be added later. To use libreadline instead of libeditline the environment variables 'EDITLINE_LIBS' and 'EDITLINE_CFLAGS' have to been set during the ./configure step. Example: EDITLINE_LIBS="/usr/lib/x86_64-linux-gnu/libhistory.so /usr/lib/x86_64-linux-gnu/libreadline.so" EDITLINE_CFLAGS="-DREADLINE" The reason for this change is that for example on Debian already three different editline libraries exist but none of those is compatible the flavor used by nix. My hope is that with this change it would be easier to port nix to systems that have already libreadline available.
2018-11-20 repl: Remove code that was commented outKai Harries1-2/+0
2018-11-16 nix ls-nar: allow reading from FIFOsLinus Heckemann1-1/+1
fixes #2528
2018-11-13 Merge branch 'feature/editline-pr' of https://github.com/dtzWill/nixEelco Dolstra2-33/+77
2018-11-13 Restore parent mount namespace before executing a child processEelco Dolstra3-2/+9
This ensures that they can't write to /nix/store. Fixes #2535.
2018-10-29 repl: complete if all matches share prefixWill Dietz1-0/+18
2018-10-29 editline: wipWill Dietz2-33/+59
2018-10-29 nix doctor: return nonzero exitcode if a check failsDaiderd Jordan1-6/+20
This makes it easier to use this when testing the installer or when running the checks with other automated tooling.
2018-10-27 Fix signedness warningEelco Dolstra1-1/+1
2018-10-27 Merge branch 'nix-doctor' of https://github.com/LnL7/nixEelco Dolstra1-0/+110
2018-10-26 src/nix/local.mk: fix typos in names of symlinksWill Dietz1-1/+1
2018-10-26 Merge all nix-* binaries into nixEelco Dolstra2-6/+21
These are all symlinks to 'nix' now, reducing the installed size by about ~1.7 MiB.
2018-10-08 Merge pull request #2452 from ElvishJerricco/verify-sigs-overflowEelco Dolstra1-1/+1
Fix overflow when verifying signatures of content addressable paths
2018-09-27 Don't talk about a "current folder build output"Eelco Dolstra1-4/+4
Presumably this refers to ./default.nix but the support for that in 'nix' is tenuous. Also folders are a Mac thing.
2018-09-26 nix doctor: reimplement profile warning without gcroot checkDaiderd Jordan1-20/+19
Calculating roots seems significantly slower on darwin compared to linux. Checking for /profile/ links could show some false positives but should still catch most issues.
2018-09-25 Fix overflow when verifying signatures of content addressable pathsWill Fancher1-1/+1
2018-09-24 Merge pull request #2312 from ↵Eelco Dolstra1-1/+3
dtzWill/fix/matched-names-should-still-print-version search: include version for matches too!
2018-09-10 auto args on replDing Xiang Fei1-2/+3
2018-09-02 nix doctor: only perform path/profile checks with a daemon/local storeDaiderd Jordan1-3/+6
Not all store types LegacySSHStore support these operations and it doesn't really make sense to check those.
2018-09-02 nix doctor: add check for profile rootsDaiderd Jordan1-0/+35
In most cases profiles that are in PATH should have a gcroot.
2018-09-02 nix doctor: add warning for multiple versionsDaiderd Jordan1-0/+17
It's pretty easy to unintentionally install a second version of nix into the user profile when using a daemon install. In this case it looks like nix was upgraded while the nix-daemon is probably still unning an older version.
2018-09-02 nix doctor: handle serve protocolDaiderd Jordan1-4/+9
The serve protocol used by LegacySSHStore has a different major and shouldn't be compared to PROTOCOL_VERSION.
2018-09-02 nix doctor: add warning if client/daemon protocol mismatchesDaiderd Jordan1-1/+26
A protocol mismatch can sometimes cause problems when using specific features with an older daemon. For example: Nix 2.0 changed the way files are compied to the store. The daemon is backwards compatible and can still handle older clients, however a 1.11 nix-daemon isn't forwards compatible.
2018-09-02 nix doctor: add commandDaiderd Jordan1-0/+26
Inspired by the homebrew command, shows a combination of debugging information and warnings with potential issues with a nix installation.
2018-09-01 nix path-info: Remove trailing spacesEelco Dolstra1-1/+4
Fixes #2390.
2018-08-31 Really fix the buildEelco Dolstra1-0/+1
2018-08-31 nix path-info: Hopefully fix macOS build failureEelco Dolstra1-2/+2
https://hydra.nixos.org/build/80480356
2018-08-30 nix upgrade-nix: Handle .nix-profile being a link to .../profiles/per-user/...Eelco Dolstra1-12/+22
Also some cosmetic improvements.
2018-08-30 nix upgrade-nix: Improve error message if 'nix' is not in a profileEelco Dolstra1-1/+1
E.g. $ nix upgrade-nix error: directory '/home/eelco/Dev/nix/inst/bin' does not appear to be part of a Nix profile instead of $ nix upgrade-nix error: '/home/eelco/Dev/nix/inst' is not a symlink
2018-08-30 Merge branch 'nix-upgrade-profile' of https://github.com/LnL7/nixEelco Dolstra1-11/+23
2018-08-30 Add simple test for nix upgrade-nixEelco Dolstra1-1/+8
2018-08-30 printSize() fixesEelco Dolstra1-7/+5
Fix a 32-bit overflow that resulted in negative numbers being printed; use fmt() instead of boost::format(); change -H to -h for consistency with 'ls' and 'du'; make the columns narrower (since they can't be bigger than 1024.0).
2018-08-30 Avoid overflow and use boost::formatBenjamin Hipple1-6/+7
If the user has an object greater than 1024 yottabytes, it'll just display it as N yottabytes instead of overflowing. Swaps to use boost::format strings instead of std::setw and std::setprecision.
2018-08-30 Add human readable closure sizes to nix path-infoBenjamin Hipple1-2/+27
Unfortunately, -h is already taken as a short option by --help, so we have to use a different letter or the capitalized version. Resolves #2363
2018-08-30 nix: Remove the -h flagEelco Dolstra1-1/+0
2018-08-29 Merge pull request #2336 from ivan/repl-trailing-spacesEelco Dolstra1-1/+6
repl: don't add trailing spaces to history lines
2018-08-25 upgrade-nix: resolve profile symlinksDaiderd Jordan1-3/+10
The profile present in PATH is not necessarily the actual profile location. User profiles are generally added as $HOME/.nix-profile in which case the indirect profile link needs to be resolved first. /home/user/.nix-profile -> /nix/var/nix/profiles/per-user/user/profile /nix/var/nix/profiles/per-user/user/profile -> profile-15-link /nix/var/nix/profiles/per-user/user/profile-14-link -> /nix/store/hyi4kkjh3bwi2z3wfljrkfymz9904h62-user-environment /nix/var/nix/profiles/per-user/user/profile-15-link -> /nix/store/6njpl3qvihz46vj911pwx7hfcvwhifl9-user-environment To upgrade nix here we want /nix/var/nix/profiles/per-user/user/profile-16-link instead of /home/user/.nix-profile-1-link. The latter is not a gcroot and would be garbage collected, resulting in a broken profile. Fixes #2175
2018-08-25 upgrade-nix: add --dry-runDaiderd Jordan1-8/+13
2018-08-19 nix run: Restore CPU affinityEelco Dolstra1-0/+3
Fixes #2359.
2018-08-10 Slightly questionable workaround for #2342Eelco Dolstra1-1/+1
2018-08-09 nix run: Respect propagated-user-env-packagesEelco Dolstra1-2/+21
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-08-07 repl: don't add trailing spaces to history linesIvan Kozik1-1/+6