aboutsummaryrefslogtreecommitdiff
path: root/src/nix
AgeCommit message (Collapse)Author
2019-05-15nix: Add --print-build-logs flagEelco Dolstra
This causes 'nix' to print build log output to stderr rather than showing the last log line in the progress bar. Log lines are prefixed by the name of the derivation (minus the version string), e.g. binutils> make[1]: Leaving directory '/build/binutils-2.31.1' binutils-wrapper> unpacking sources binutils-wrapper> patching sources ... binutils-wrapper> Using dynamic linker: '/nix/store/kr51dlsj9v5cr4n8700jliyz8v5b2q7q-bootstrap-stage0-glibc/lib/ld-linux-x86-64.so.2' bootstrap-stage2-gcc-wrapper> unpacking sources ... linux-headers> unpacking sources linux-headers> unpacking source archive /nix/store/8javli69jhj3bkql2c35gsj5vl91p382-linux-4.19.16.tar.xz
2019-03-14experimental/optional -> optionalEelco Dolstra
2019-02-05Revert "Restore parent mount namespace before executing a child process"Eelco Dolstra
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-10Merge pull request #2617 from veprbl/pr/V547_nix_repl.ccEelco Dolstra
remove some dead code in nix/repl.cc
2019-01-05Remove mentions of `libformat`, it no longer existsJohn Ericson
2018-12-25remove some dead code in nix/repl.ccDmitry Kalinkin
Fixes a static analyzer warning: Expression 'isDrv' is always false. Fixes: 3beb6f6e7 ('Show derivations more concisely')
2018-12-13Support SRI hashesEelco Dolstra
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-12nix repl: don't create result symlinksDaiderd Jordan
2018-11-20repl: give user the choice between libeditline and libreadlineKai Harries
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-20repl: Remove code that was commented outKai Harries
2018-11-16nix ls-nar: allow reading from FIFOsLinus Heckemann
fixes #2528
2018-11-13Merge branch 'feature/editline-pr' of https://github.com/dtzWill/nixEelco Dolstra
2018-11-13Restore parent mount namespace before executing a child processEelco Dolstra
This ensures that they can't write to /nix/store. Fixes #2535.
2018-10-29repl: complete if all matches share prefixWill Dietz
2018-10-29editline: wipWill Dietz
2018-10-29nix doctor: return nonzero exitcode if a check failsDaiderd Jordan
This makes it easier to use this when testing the installer or when running the checks with other automated tooling.
2018-10-27Fix signedness warningEelco Dolstra
2018-10-27Merge branch 'nix-doctor' of https://github.com/LnL7/nixEelco Dolstra
2018-10-26src/nix/local.mk: fix typos in names of symlinksWill Dietz
2018-10-26Merge all nix-* binaries into nixEelco Dolstra
These are all symlinks to 'nix' now, reducing the installed size by about ~1.7 MiB.
2018-10-08Merge pull request #2452 from ElvishJerricco/verify-sigs-overflowEelco Dolstra
Fix overflow when verifying signatures of content addressable paths
2018-09-27Don't talk about a "current folder build output"Eelco Dolstra
Presumably this refers to ./default.nix but the support for that in 'nix' is tenuous. Also folders are a Mac thing.
2018-09-26nix doctor: reimplement profile warning without gcroot checkDaiderd Jordan
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-25Fix overflow when verifying signatures of content addressable pathsWill Fancher
2018-09-24Merge pull request #2312 from ↵Eelco Dolstra
dtzWill/fix/matched-names-should-still-print-version search: include version for matches too!
2018-09-10auto args on replDing Xiang Fei
2018-09-02nix doctor: only perform path/profile checks with a daemon/local storeDaiderd Jordan
Not all store types LegacySSHStore support these operations and it doesn't really make sense to check those.
2018-09-02nix doctor: add check for profile rootsDaiderd Jordan
In most cases profiles that are in PATH should have a gcroot.
2018-09-02nix doctor: add warning for multiple versionsDaiderd Jordan
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-02nix doctor: handle serve protocolDaiderd Jordan
The serve protocol used by LegacySSHStore has a different major and shouldn't be compared to PROTOCOL_VERSION.
2018-09-02nix doctor: add warning if client/daemon protocol mismatchesDaiderd Jordan
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-02nix doctor: add commandDaiderd Jordan
Inspired by the homebrew command, shows a combination of debugging information and warnings with potential issues with a nix installation.
2018-09-01nix path-info: Remove trailing spacesEelco Dolstra
Fixes #2390.
2018-08-31Really fix the buildEelco Dolstra
2018-08-31nix path-info: Hopefully fix macOS build failureEelco Dolstra
https://hydra.nixos.org/build/80480356
2018-08-30nix upgrade-nix: Handle .nix-profile being a link to .../profiles/per-user/...Eelco Dolstra
Also some cosmetic improvements.
2018-08-30nix upgrade-nix: Improve error message if 'nix' is not in a profileEelco Dolstra
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-30Merge branch 'nix-upgrade-profile' of https://github.com/LnL7/nixEelco Dolstra
2018-08-30Add simple test for nix upgrade-nixEelco Dolstra
2018-08-30printSize() fixesEelco Dolstra
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-30Avoid overflow and use boost::formatBenjamin Hipple
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-30Add human readable closure sizes to nix path-infoBenjamin Hipple
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-30nix: Remove the -h flagEelco Dolstra
2018-08-29Merge pull request #2336 from ivan/repl-trailing-spacesEelco Dolstra
repl: don't add trailing spaces to history lines
2018-08-25upgrade-nix: resolve profile symlinksDaiderd Jordan
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-25upgrade-nix: add --dry-runDaiderd Jordan
2018-08-19nix run: Restore CPU affinityEelco Dolstra
Fixes #2359.
2018-08-10Slightly questionable workaround for #2342Eelco Dolstra
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-08-07repl: don't add trailing spaces to history linesIvan Kozik