aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-12-23build-remote no longer requires local store be localJohn Ericson
2020-12-23Move some PKI stuff from LocalStore to StoreJohn Ericson
2020-12-23Merge pull request #4336 from NixOS/manpagesEelco Dolstra
Documentation for nix subcommands
2020-12-23Add 'nix' manpageEelco Dolstra
2020-12-23Add TODOEelco Dolstra
2020-12-23Command: Remove examples()Eelco Dolstra
2020-12-23Add 'nix flake' manpagesEelco Dolstra
2020-12-23Merge pull request #4366 from NixOS/readInvalidDerivation-on-remote-cachesEelco Dolstra
Use the fs accessor for readInvalidDerivation
2020-12-22Merge branch 'git-rev-error' of https://github.com/Ma27/nix into masterEelco Dolstra
2020-12-22Fix testsEelco Dolstra
2020-12-22Move <nix/fetchurl.nix> into the nix binaryEelco Dolstra
This makes the statically linked nix binary just work, without needing any additional files.
2020-12-22chrootHelper: Handle symlinks in the root directoryEelco Dolstra
This is necessary on Ubuntu where /bin and /lib* are symlinks.
2020-12-22Document `allRefs` argument of `builtins.fetchTree`Maximilian Bosch
2020-12-22Don't log from inside the loggerEelco Dolstra
This deadlocks ProgressBar, e.g. # nix run --impure --no-substitute --store '/tmp/nix2?store=/foo' --expr 'derivation { builder = /nix/store/zi90rxslsm4mlr46l2xws1rm94g7pk8p-busybox-1.31.1-x86_64-unknown-linux-musl/bin/busybox; }' leads to Thread 1 (Thread 0x7ffff6126e80 (LWP 12250)): #0 0x00007ffff7215d62 in __lll_lock_wait () from /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libpthread.so.0 #1 0x00007ffff720e721 in pthread_mutex_lock () from /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libpthread.so.0 #2 0x00007ffff7ad17fa in __gthread_mutex_lock (__mutex=0x6c5448) at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/x86_64-unknown-linux-gnu/bits/gthr-default.h:749 #3 std::mutex::lock (this=0x6c5448) at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/bits/std_mutex.h:100 #4 std::unique_lock<std::mutex>::lock (this=0x7fffffff09a8, this=0x7fffffff09a8) at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/bits/unique_lock.h:141 #5 std::unique_lock<std::mutex>::unique_lock (__m=..., this=0x7fffffff09a8) at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/bits/unique_lock.h:71 #6 nix::Sync<nix::ProgressBar::State, std::mutex>::Lock::Lock (s=0x6c5448, this=0x7fffffff09a0) at src/libutil/sync.hh:45 #7 nix::Sync<nix::ProgressBar::State, std::mutex>::lock (this=0x6c5448) at src/libutil/sync.hh:85 #8 nix::ProgressBar::logEI (this=0x6c5440, ei=...) at src/libmain/progress-bar.cc:131 #9 0x00007ffff7608cfd in nix::Logger::logEI (ei=..., lvl=nix::lvlError, this=0x6c5440) at src/libutil/logging.hh:88 #10 nix::getCodeLines (errPos=...) at src/libutil/error.cc:66 #11 0x00007ffff76073f2 in nix::showErrorInfo (out=..., einfo=..., showTrace=<optimized out>) at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/optional:897 #12 0x00007ffff7ad19e7 in nix::ProgressBar::logEI (this=0x6c5440, ei=...) at src/libmain/progress-bar.cc:134 #13 0x00007ffff7ab9d10 in nix::Logger::logEI (ei=..., lvl=nix::lvlError, this=0x6c5440) at src/libutil/logging.hh:88 #14 nix::handleExceptions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()>) (programName="/home/eelco/Dev/nix/outputs/out/bin/nix", fun=...) at src/libmain/shared.cc:328 #15 0x000000000046226b in main (argc=<optimized out>, argv=<optimized out>) at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/ext/new_allocator.h:80
2020-12-22Add explicit `allRefs = true;` argument to `fetchGit`Maximilian Bosch
Sometimes it's necessary to fetch a git repository at a revision and it's unknown which ref contains the revision in question. An example would be a Cargo.lock which only provides the URL and the revision when using a git repository as build input. However it's considered a bad practice to perform a full checkout of a repository since this may take a lot of time and can eat up a lot of disk space. This patch makes a full checkout explicit by adding an `allRefs` argument to `builtins.fetchGit` which fetches all refs if explicitly set to true. Closes #2409
2020-12-22Provide a more meaningful error-message for `builtins.fetchGit` if a ↵Maximilian Bosch
revision can't be checked out A common pitfall when using e.g. `builtins.fetchGit` is the `fatal: not a tree object`-error when trying to fetch a revision of a git-repository that isn't on the `master` branch and no `ref` is specified. In order to make clear what's the problem, I added a simple check whether the revision in question exists and if it doesn't a more meaningful error-message is displayed: ``` nix-repl> builtins.fetchGit { url = "https://github.com/owner/myrepo"; rev = "<commit not on master>"; } moderror: --- Error -------------------------------------------------------------------- nix Cannot find Git revision 'bf1cc5c648e6aed7360448a3745bb2fe4fbbf0e9' in ref 'master' of repository 'https://gitlab.com/Ma27/nvim.nix'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit. ``` Closes #2431
2020-12-21Add 'nix profile' manpageEelco Dolstra
2020-12-21Add 'nix bundle' manpageEelco Dolstra
Fixes #4375.
2020-12-21Add 'nix store diff-closures' manpageEelco Dolstra
2020-12-21Add 'nix show-derivation' manpageEelco Dolstra
2020-12-21nix show-derivation: Say "system" instead of "platform"Eelco Dolstra
There is really no good reason to use "platform" except that that's what we use internally (also for no good reason).
2020-12-21Add 'nix help' manpageEelco Dolstra
2020-12-21Add 'nix store make-content-addressable' manpageEelco Dolstra
2020-12-21DohEelco Dolstra
2020-12-21Add 'nix path-info' manpageEelco Dolstra
2020-12-21Add 'nix store optimise' manpageEelco Dolstra
2020-12-21Add 'nix store verify' manpageEelco Dolstra
2020-12-21Add 'nix upgrade-nix' manpageEelco Dolstra
2020-12-21Add 'nix why-depends' manpageEelco Dolstra
2020-12-21Add 'nix store' NAR-related manpagesEelco Dolstra
2020-12-21Add 'nix nar' manpagesEelco Dolstra
2020-12-21Add 'nix eval' manpageEelco Dolstra
2020-12-21Add 'nix store ping' manpageEelco Dolstra
2020-12-21TweakEelco Dolstra
2020-12-21Add 'nix log' manpageEelco Dolstra
2020-12-21Add 'nix repl' manpageEelco Dolstra
2020-12-21Add 'nix edit' manpageEelco Dolstra
2020-12-21TypoEelco Dolstra
2020-12-21Add 'nix registry' manpagesEelco Dolstra
This also documents the registry format and matching/unification semantics (though not quite correctly).
2020-12-21Add 'nix develop' and `nix print-dev-env' manpagesEelco Dolstra
2020-12-21Add 'nix search' manpageEelco Dolstra
2020-12-21Add 'nix copy' manpageEelco Dolstra
2020-12-21Add 'nix run' and 'nix shell' manpagesEelco Dolstra
2020-12-21Add 'nix build' manpageEelco Dolstra
2020-12-21Move doc() to ArgsEelco Dolstra
2020-12-21Merge pull request #4385 from obsidiansystems/store-subclassEelco Dolstra
Overhaul store subclassing
2020-12-21Merge pull request #4355 from Infinisil/private-value-typeEelco Dolstra
Refactoring for private Value type
2020-12-20Overhaul store subclassingJohn Ericson
We embrace virtual the rest of the way, and get rid of the `assert(false)` 0-param constructors. We also list config base classes first, so the constructor order is always: 1. all the configs 2. all the stores Each in the same order
2020-12-18Replace Value type setters with mk* functionsSilvan Mosberger
Move clearValue inside Value mkInt instead of setInt mkBool instead of setBool mkString instead of setString mkPath instead of setPath mkNull instead of setNull mkAttrs instead of setAttrs mkList instead of setList* mkThunk instead of setThunk mkApp instead of setApp mkLambda instead of setLambda mkBlackhole instead of setBlackhole mkPrimOp instead of setPrimOp mkPrimOpApp instead of setPrimOpApp mkExternal instead of setExternal mkFloat instead of setFloat Add note that the static mk* function should be removed eventually
2020-12-17Rename Value::normalType() -> Value::type()Silvan Mosberger