aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-08-21nix develop: Fix `devShells` lookupJan Tojnar
It currently fails with the following error: error: flake 'git+file://…' does not provide attribute 'devShells.x86_64-linuxhaskell', 'packages.x86_64-linux.haskell', 'legacyPackages.x86_64-linux.haskell' or 'haskell'
2021-08-16Merge pull request #5134 from pszubiak/fix-pkgconfig-install-pathEelco Dolstra
Install pkg-config files in the correct location
2021-08-14fix typo in ca-error messageJörg Thalheim
2021-08-13Install pkg-config files in the correct locationPiotr Szubiakowski
Use `$(libdir)` while installing .pc files looks like a more generic solution. For example, it will work for distributions like RHEL or Fedora where .pc files are installed in `/usr/lib64/pkgconfig`.
2021-08-11In flake lock file diffs, show the last-modified date of inputs if availableEelco Dolstra
This is a bit more informative than just the hash. Also, format the diffs a bit nicer.
2021-08-1015f4d4f follow upPamplemousse
* libstore: `bz2` should not be linked * libutil: `zlib.h` should not be included Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-09Merge pull request #5111 from Pamplemousse/cleanEelco Dolstra
Minor maintenance cleaning
2021-08-09libexpr: Squash similar conditionsPamplemousse
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-09Merge pull request #5101 from fzakaria/faridzakaria/fix-nix-shellEelco Dolstra
nix-shell --pure: Let it work for any derivation
2021-08-09Merge pull request #5104 from andir/refscan-raceEelco Dolstra
Fix potential race-condition in reference scanning code
2021-08-09Merge pull request #5106 from andir/libstore-waiter-setEelco Dolstra
libstore: use set instead of list for waiter list
2021-08-08libstore: use set instead of list for waiter listAndreas Rammhold
This replaces the O(n) search complexity in our insert code with a lookup of O(log n). It also makes removing waitees easier as we can use the extract method provided by the set class.
2021-08-07Fix potential race-condition in reference scanning codeAndreas Rammhold
Previously the code ensures that the isBase32 array would only be initialised once in a single-threaded context. If two threads happen to call the function before the initialisation was completed both of them would have completed the initialization step. This allowed for a race-condition where one thread might be done with the initialization but the other thread sets all the fields to false again. For a brief moment the base32 detection would then produce false-negatives.
2021-08-07Whitelist nixConfig.flake-registryAlexander Bantyev
flake-registry should be safe to set to an aribtrary value, since it is identical to just setting `inputs`.
2021-08-06nix-shell --pure: Let it work for any derivationFarid Zakaria
`nix-shell --pure` when applied to a non stdenv derivation doesn't seem to clear the PATH. It expects the stdenv/setup file to do so. This adds an explicit `unset PATH` by nix-build.cc (nix-shell) itself so that it's not reliant on stdenv/setup anymore. This does not break impure nix-shell since the PATH is persisted as the variable `p` prior in the bash rcfile fixes #5092
2021-08-06Merge pull request #5075 from andir/libutil-base64-initEelco Dolstra
libutil: initialize the base64 decode array only once
2021-08-02fix git init race conditionMichael Fellinger
2021-07-31nix-shell -p: pass --arg values as nixpkgs paramsldesgoui
2021-07-30libutil: initialize the base64 decode array only onceAndreas Rammhold
Previously, despite having a boolean that tracked initialization, the decode characters have been "calculated" every single time a base64 string was being decoded. With this change we only initialize the decode array once in a thread-safe manner.
2021-07-30Remove unused struct in `libstore`Pamplemousse
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-28Merge pull request #5042 from alyssais/pthreadEelco Dolstra
Enable pthreads for new libraries
2021-07-27nix develop: Support chroot storesEelco Dolstra
Fixes #5024.
2021-07-27Merge pull request #5048 from tweag/flox-eval-storeEelco Dolstra
--eval-store and faster closure copying
2021-07-27nix-instantiate: Fix --eval-storeEelco Dolstra
2021-07-27Merge pull request #5046 from ncfavier/patch-1Eelco Dolstra
Fix --no-gc-warning
2021-07-27Merge pull request #5043 from alyssais/vexingEelco Dolstra
libutil: use uniform initialization in _deletePath
2021-07-26libexpr: Remove unused codePamplemousse
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-26Merge pull request #5037 from Pamplemousse/less_globalsEelco Dolstra
Avoid global counters
2021-07-26Revert no longer necessary changeEelco Dolstra
2021-07-26Low-latency closure copyEelco Dolstra
This adds a new store operation 'addMultipleToStore' that reads a number of NARs and ValidPathInfos from a Source, allowing any number of store paths to be copied in a single call. This is much faster on high-latency links when copying a lot of small files, like .drv closures. For example, on a connection with an 50 ms delay: Before: $ nix copy --to 'unix:///tmp/proxy-socket?root=/tmp/dest-chroot' \ /nix/store/90jjw94xiyg5drj70whm9yll6xjj0ca9-hello-2.10.drv \ --derivation --no-check-sigs real 0m57.868s user 0m0.103s sys 0m0.056s After: real 0m0.690s user 0m0.017s sys 0m0.011s
2021-07-25Fix --no-gc-warningNaïm Favier
Broken by 8e758d402ba1045c7b8273f8cb1d6d8d917ca52b
2021-07-24libutil: use uniform initialization in _deletePathAlyssa Ross
Otherwise I get a compiler error when building for NetBSD: src/libutil/util.cc: In function 'void nix::_deletePath(const Path&, uint64_t&)': src/libutil/util.cc:438:17: error: base operand of '->' is not a pointer 438 | AutoCloseFD dirfd(open(dir.c_str(), O_RDONLY)); | ^~~~~ src/libutil/util.cc:439:10: error: 'dirfd' was not declared in this scope 439 | if (!dirfd) { | ^~~~~ src/libutil/util.cc:444:17: error: 'dirfd' was not declared in this scope 444 | _deletePath(dirfd.get(), path, bytesFreed); | ^~~~~
2021-07-24Enable pthreads for new librariesAlyssa Ross
Otherwise the lack of pthread causes linking to fail for NetBSD.
2021-07-22RemoteStore::buildPaths(): Handle evalStoreEelco Dolstra
2021-07-22Remove redundant RealisedPath::closure() callEelco Dolstra
2021-07-22Fix formatting error in 'nix store' manpageEelco Dolstra
2021-07-22buildPaths(): Add an evalStore argumentEelco Dolstra
With this, we don't have to copy the entire .drv closure to the destination store ahead of time (or at all). Instead, buildPaths() reads .drv files from the eval store and copies inputSrcs to the destination store if it needs to build a derivation. Issue #5025.
2021-07-22copyPaths: Pass store by referenceEelco Dolstra
2021-07-22Use eval-store in more placesEelco Dolstra
In particular, this now works: $ nix path-info --eval-store auto --store https://cache.nixos.org nixpkgs#hello Previously this would fail as it would try to upload the hello .drv to cache.nixos.org. Now the .drv is instantiated in the local store, and then we check for the existence of the outputs in cache.nixos.org.
2021-07-22DummyStore: Remove redundant methodEelco Dolstra
2021-07-22nix-shell: Handle --eval-store correctlyEelco Dolstra
2021-07-22nix-build: Copy drv closure between eval store and build storeEelco Dolstra
2021-07-22Support --eval-store in nix-instantiate and nix-buildEelco Dolstra
2021-07-22Hacky fast closure copying mechanismEelco Dolstra
2021-07-22Add --eval-store optionEelco Dolstra
2021-07-22Downgrade warning messageEelco Dolstra
If a store doesn't support GC, then we don't need to warn about the inability to create roots.
2021-07-21Avoid global countersPamplemousse
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-21Tweak --no/use-registries doc stringsEelco Dolstra
2021-07-21Merge branch 'balsoft/no-registries' of https://github.com/serokell/nixEelco Dolstra
2021-07-20deletePath(): Return ENFILE instead of EBADF when out of file descriptorsEelco Dolstra
Also remove an erroneous comment.