aboutsummaryrefslogtreecommitdiff
path: root/src/nix
AgeCommit message (Collapse)Author
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
2018-08-06Merge pull request #2334 from dtzWill/fix/revert-progress-bar-refresh-for-nowEelco Dolstra
Revert "progress-bar: re-draw last update if nothing new for 1sec."
2018-08-02s3 binary cache: support specifying an endpointGraham Christensen
Works for uploading and not downloading.
2018-07-27search: include versionWill Dietz
2018-07-19Revert "progress-bar: re-draw last update if nothing new for 1sec."Will Dietz
Not ready for this yet, causes the prompt to disappear in nix repl and more generally can overwrite non-progress-bar messages. This reverts commit 44de71a39624d86d6744062ee36f57170024c9a0.
2018-07-06Merge pull request #2250 from dtzWill/feature/repl-progress-bar-buildsEelco Dolstra
repl: use `nix build` for building instead of `nix-store -r`
2018-07-03nix why-depends: render output into $PAGERMaximilian Bosch
2018-07-02Merge pull request #2158 from Ma27/improve-search-uxEelco Dolstra
search.cc: improve UX for `nix search`
2018-07-02search.cc: improve UX for `nix search`Maximilian Bosch
As proposed in #1634 the `nix search` command could use some improvements. Initially 0413aeb35d6ee869a98b6565781c1cf47dc80080 added some basic sorting behavior using `std::map`, a next step would be an improvement of the output. This patch includes the following changes: * Use `$PAGER` for outputs with `RunPager` from `shared.hh`: The same behavior is defined for `nix-env --query`, furthermore it makes searching huge results way easier. * Simplified result blocks: The new output is heavily inspired by the output from `nox`, the first line shows the attribute path and the derivaiton name (`attribute path (derivation name)`) and the description in the second line.
2018-06-23repl: use `nix build` for building instead of `nix-store -r`Will Dietz
progress bar!
2018-06-18progress-bar: re-draw last update if nothing new for 1sec.Will Dietz
Slightly nicer behavior when updates are somewhat far apart (during a long linking step, perhaps) ensuring things don't appear unresponsive. If we wait the maximum amount for the update, don't bother waiting another 50ms (for rate-limiting purposes) and just check if we should quit. This also ensures we'll notice the request to quit within 1s if quit is signalled but there is not an udpate. (I'm not sure if this happens or not)
2018-06-13nix: Remove special handling of .drv filesEelco Dolstra
This makes 'nix copy' and 'nix path-info' work on .drv store paths. Removing special treatment of .drv files seems the most future-proof approach given the possible removal of .drv files in the future. Note that 'nix build' will still build (rather than substitute) .drv paths due to the unfortunate overloading in Store::buildPaths().
2018-06-12Move EvalState from the stack to the heapEelco Dolstra
EvalState contains a few counters (e.g. nrValues) that increase quickly enough that they end up being interpreted as pointers by the garbage collector. Moving it to the heap makes them invisible to the garbage collector. This reduces the max RSS doing 100 evaluations of nixos.tests.firefox.x86_64-linux.drvPath from 455 MiB to 292 MiB. Note: ideally, allocations would be much further up in the 64-bit address space to reduce the odds of an integer being misinterpreted as a pointer. Maybe we can use some linker magic to move the .bss segment to a higher address.
2018-05-30Move evaluator-specific settings out of libstoreEelco Dolstra
2018-05-30Modularize config settingsEelco Dolstra
Allow global config settings to be defined in multiple Config classes. For example, this means that libutil can have settings and evaluator settings can be moved out of libstore. The Config classes are registered in a new GlobalConfig class to which config files etc. are applied. Relevant to https://github.com/NixOS/nix/issues/2009 in that it removes the need for ad hoc handling of useCaseHack, which was the underlying cause of that issue.
2018-04-18Allow multiple search experssions in nix searchDaniel Poelzleithner
The common use case is to search for packages containing multiple words like a "git" "frontend". Having only one expressions makes this simple regular use case very complicated. Instead, search accepts multiple regular epressions which all need to match. nix search git 'gui|frontend' returns a list of all git uis for example
2018-04-17Handle arguments in $EDITOREelco Dolstra
Fixes #2079.
2018-04-16nix repl: Fix multiline SIGINT handling.Félix Baylac-Jacqué
Fixes #2076
2018-04-11Fix #2057Eelco Dolstra
2018-03-30nix copy: add an example with S3zimbatm
I couldn't find a good example how to use it with non-us-east-1 buckets.
2018-03-29Remove reference to non-existent manpagesEelco Dolstra
2018-03-15Filter ANSI colors when not writing to a terminalEelco Dolstra
Fixes https://github.com/NixOS/nixpkgs/issues/37114.
2018-03-13Merge pull request #1906 from dtzWill/fix/nix-searchShea Levy
nix search: tests and fix #1893 and part of #1892
2018-03-02Merge branch 'improve-search-algorithm' of git://github.com/Ma27/nixShea Levy
2018-03-02Merge branch 'write-failure-fixes' of git://github.com/lheckemann/nixShea Levy
2018-02-26nix run: Fix segfault on macOSEelco Dolstra
Note that clearenv() is not available on macOS. Fixes #1907.
2018-02-25nix search: explicitly handle empty search string, fixes #1893Will Dietz
This is important since this is given as an example. Other patterns containing "empty search string" will still be handled differently on different platforms ("asdf|") but that's less of an issue.
2018-02-25nix search: fix bug where we wrote to cache when shouldn't, breakingWill Dietz
This is exposed by the tests added previously, and resolves the error reported in #1892: "expected JSON value".
2018-02-22Merge branch 'fix/dry-run-partially' of https://github.com/dtzWill/nixEelco Dolstra