aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-01Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-07-31Tweak descriptionEelco Dolstra
2020-07-31Merge branch 'nix-command-build-check' of https://github.com/Ma27/nixEelco Dolstra
2020-07-31nix bundle: Set categoryEelco Dolstra
2020-07-31nix/build: add `--rebuild` optionMaximilian Bosch
Occasionally, `nix-build --check` is fairly helpful and I'd like to be able to use this feature for flakes that need to be built with `nix build` as well.
2020-07-31Merge pull request #3788 from crinklywrappr/masterEelco Dolstra
Add a script to install nix on non-systemd systems.
2020-07-31Merge pull request #3880 from matthewbauer/nix-bundleEelco Dolstra
Add "bundle" command to Nix
2020-07-31Merge pull request #3881 from matthewbauer/fix-builtins-pathEelco Dolstra
Fix builtins.path
2020-07-30Make expectedHash optional in prim_pathMatthew Bauer
This fixes an error found in builtins.path that looks like: store path mismatch in (possibly filtered) path added from '/private/tmp/nix-shell.CyXViH/nix-test/filter-source/filterin' when no hash is specified
2020-07-30Add test for builtins.pathMatthew Bauer
2020-07-30Pass system to bundlerMatthew Bauer
2020-07-30Address misc reviewMatthew Bauer
2020-07-30Remove single file restriction for bundlerMatthew Bauer
2020-07-30exporter -> bundlerMatthew Bauer
2020-07-30Merge pull request #3689 from matthewbauer/substitute-other-storedirEelco Dolstra
Substitutions from different store dirs
2020-07-30Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer
2020-07-30Handle exporters checking correctlyMatthew Bauer
2020-07-30Add "export" to NixMatthew Bauer
This adds a ‘nix export’ command which hooks into nix-bundle. It can be used in a similar way as nix-bundle, with the benefit of hooking into the new “app” functionality. For instance, $ nix export nixpkgs#jq $ ./jq --help jq - commandline JSON processor [version 1.6] ... $ scp jq machine-without-nix: $ ssh machine-without-nix ./jq jq - commandline JSON processor [version 1.6] ... Note that nix-bundle currently requires Linux to run. Other exporters might not have that requirement. “exporters” are meant to be reusable, so that, other repos can implement their own bundling. Fixes #3705
2020-07-30Fix buildEelco Dolstra
2020-07-30unsigned long long -> uint64_tEelco Dolstra
2020-07-30receiveContents(): unsigned int -> size_tEelco Dolstra
2020-07-30Merge pull request #3879 from illiusdope/nix-build-shell-flagsEelco Dolstra
Prevent nix-build from accepting nix-shell flags
2020-07-29Prevent nix-build from accepting --run/--commandMat Marini
2020-07-29Prevent nix-build from accepting --packagesMat Marini
2020-07-29CleanupEelco Dolstra
2020-07-29Merge pull request #3549 from Ma27/fetchgit-hashEelco Dolstra
Merge legacy `fetchGit`-builtin with the generic `fetchTree`-function
2020-07-29Merge pull request #3877 from matthewbauer/develop-continuous-regexEelco Dolstra
Set regex_constants::match_continuous for quicker search in nix develop
2020-07-29Merge pull request #3876 from NixOS/nix-copy-latencyEelco Dolstra
Fix RemoteStore::addToStore() latency
2020-07-29Set regex_constants::match_continuous for quicker searchMatthew Bauer
match_continuous limits the search to the current start position, instead of searching the entire file. On libc++, this improves performance dramatically: $ time /nix/store/70ai68dfm6xbzwn26j5n4li9di52ylia-nix-3.0pre20200728_c159f48/bin/nix print-dev-env >/dev/null /nix/store/70ai68dfm6xbzwn26j5n4li9di52ylia-nix-3.0pre20200728_c159f48/bin/ni 2.39s user 0.19s system 64% cpu 4.032 total $ time /nix/store/cwjfxxlp83zln4mfyy1d2dbsx7f6s962-nix-3.0pre20200728_dirty/bin/nix print-dev-env >/dev/null /nix/store/cwjfxxlp83zln4mfyy1d2dbsx7f6s962-nix-3.0pre20200728_dirty/bin/nix 0.09s user 0.05s system 65% cpu 0.204 total Fixes #3874
2020-07-29Fix RemoteStore::addToStore() latencyEelco Dolstra
Since 6185d25e523a3cd223dd6f6aca10cf6ff15b4823, this was very latency-bound since it required a round-trip for every 32 KiB. So for example copying a 514 MiB closure over a virtual ethernet device with a articial delay of just 1 ms took 343s. Now it takes 2.7s. Fixes #3372.
2020-07-29CleanupEelco Dolstra
2020-07-28Restore backwards-compat for current `builtins.fetchGit`Maximilian Bosch
If a repo is dirty, it used to return a `rev` object with an "empty" sha1 (0000000000000000000000000000000000000000). Please note that this only applies for `builtins.fetchGit` and *not* for `builtins.fetchTree{ type = "git"; }`.
2020-07-28Remove putBytesEelco Dolstra
istream->tellg() returns -1 so we can't get the number of bytes written. Fixes 'uploaded 's3://nix-cache/nar/00819r9lp5kajr6baxfw5dhhc0cx8ndxaz43qmd2f0gn1hk1ynlp.nar.xz' (-1 bytes) in 11620 ms' messages.
2020-07-28Bump version to 3.0Eelco Dolstra
Since there are some incompatible changes, it's better to bump the major version number.
2020-07-28Merge legacy `fetchGit`-builtin with the generic `fetchTree`-functionMaximilian Bosch
The original idea was to implement a git-fetcher in Nix's core that supports content hashes[1]. In #3549[2] it has been suggested to actually use `fetchTree` for this since it's a fairly generic wrapper over the new fetcher-API[3] and already supports content-hashes. This patch implements a new git-fetcher based on `fetchTree` by incorporating the following changes: * Removed the original `fetchGit`-implementation and replaced it with an alias on the `fetchTree` implementation. * Ensured that the `git`-fetcher from `libfetchers` always computes a content-hash and returns an "empty" revision on dirty trees (the latter one is needed to retain backwards-compatibility). * The hash-mismatch error in the fetcher-API exits with code 102 as it usually happens whenever a hash-mismatch is detected by Nix. * Removed the `flakes`-feature-flag: I didn't see a reason why this API is so tightly coupled to the flakes-API and at least `fetchGit` should remain usable without any feature-flags. * It's only possible to specify a `narHash` for a `git`-tree if either a `ref` or a `rev` is given[4]. * It's now possible to specify an URL without a protocol. If it's missing, `file://` is automatically added as it was the case in the original `fetchGit`-implementation. [1] https://github.com/NixOS/nix/pull/3216 [2] https://github.com/NixOS/nix/pull/3549#issuecomment-625194383 [3] https://github.com/NixOS/nix/pull/3459 [4] https://github.com/NixOS/nix/pull/3216#issuecomment-553956703
2020-07-27Merge pull request #3738 from obsidiansystems/hash-always-has-typeEelco Dolstra
Hash always has a valid type
2020-07-27Merge remote-tracking branch 'upstream/master' into hash-always-has-typeJohn Ericson
2020-07-27Merge pull request #3795 from ↵Eelco Dolstra
obsidiansystems/optional-derivation-output-storepath Only store hash in DerivationOutput for fixed output derivations
2020-07-27Merge remote-tracking branch 'upstream/master' into ↵John Ericson
optional-derivation-output-storepath
2020-07-27Merge remote-tracking branch 'upstream/master' into hash-always-has-typeJohn Ericson
2020-07-26Merge pull request #3860 from matthewbauer/precompile-headers-crossEelco Dolstra
Allow PRECOMPILE_HEADERS in cross-compilation
2020-07-25Allow PRECOMPILE_HEADERS in cross-compilationMatthew Bauer
In cross, CXX will look like aarch64-unknown-linux-gnu-g++. We could run some command to check what kind of compiler it is, but for now we can just check if g++ is anywhere in the string. I couldn’t find any "ends with" for makefile, so it can be anywhere in CXX.
2020-07-24createUnixDomainSocket(): Fix off-by-one error in copying the socket pathEelco Dolstra
Reported by Kane York.
2020-07-23Remove unused fileEelco Dolstra
2020-07-23Merge pull request #3855 from obsidiansystems/delete-find-outputEelco Dolstra
Get rid of `basicDerivation::findOutput`
2020-07-23Get rid of `basicDerivation::findOutput`John Ericson
It's a tiny function which is: - hardly worth abstrating over, and also only used once. - doesn't work once we get CA drvs I rewrote the one callsite to be forwards compatable with CA derivations, and also potentially more performant: instead of reading in the derivation it can ust consult the SQLite DB in the common case.
2020-07-23Merge pull request #3854 from B4dM4n/registry-pin-writeEelco Dolstra
Save changes made by "nix registry pin" to user registry
2020-07-23Save changes made by "nix registry pin" to user registryFabian Möller
2020-07-23Merge pull request #3850 from obsidiansystems/references-scan-cleanupEelco Dolstra
Separate concerns in `scanForReferences` with TeeSink
2020-07-22Separate concerns in `scanForReferences` with TeeSinkJohn Ericson
This also will make it easier to use a `HashModuloSink` instead for CA derivations.