aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-12DerivedPathWithHints -> BuiltPathregnat
Just a renaming for now
2021-05-10Merge pull request #4781 from NixOS/locally_cache_the_remote_realisationsEelco Dolstra
Add a realisations disk cache
2021-05-10Merge pull request #4787 from Ma27/builtins-ceil-floorEelco Dolstra
Implement `builtins.floor` and `builtins.ceil` using the C library functions internally
2021-05-10Simplify the realisations disk cacheregnat
2021-05-10Remove useless parentsregnat
I never remember the exact syntax of the `switch` statement
2021-05-10primops: math.h -> cmathMaximilian Bosch
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-05-10Merge pull request #4776 from NixOS/fix-ca-normalizationEelco Dolstra
Properly normalize the content-addressed paths
2021-05-10Implement `builtins.floor` and `builtins.ceil` using the C library functions ↵Maximilian Bosch
internally Closes #4782 Note: even though the type is internally called `NixFloat`, it's actually a `double`.
2021-05-10Merge pull request #4771 from andersk/launchd-execEelco Dolstra
launchd: Use exec to avoid leaving the extra shell wrapper running
2021-05-10Merge pull request #4786 from matthewbauer/mkdir-local-share-nixEelco Dolstra
Create parent for trusted list path before writing
2021-05-08Create parent trusted list path before writingMatthew Bauer
This makes sure that $HOME/.local/share/nix exists before we try to write to it.
2021-05-06Add a realisations disk cacheregnat
Similar to the nar-info disk cache (and using the same db). This makes rebuilds muuch faster. - This works regardless of the ca-derivations experimental feature. I could modify the logic to not touch the db if the flag isn’t there, but given that this is a trash-able local cache, it doesn’t seem to be really worth it. - We could unify the `NARs` and `Realisation` tables to only have one generic kv table. This is left as an exercise to the reader. - I didn’t update the cache db version number as the new schema just adds a new table to the previous one, so the db will be transparently migrated and is backwards-compatible. Fix #4746
2021-05-06Merge pull request #4778 from ↵Eelco Dolstra
matthewbauer/fix-nix-profile-install-first-output-2 Use derivation output name from toDerivation
2021-05-05Use derivation output name from toDerivationMatthew Bauer
This was previously done in https://github.com/NixOS/nix/pull/4515 but got clobbered away in https://github.com/NixOS/nix/pull/4594. -------------------------------------------------------------------------------- This fixes an issue where derivations with a primary output that is not "out" would fail with: $ nix profile install nixpkgs#sqlite error: opening directory '/nix/store/2a2ydlgyydly5czcc8lg12n6qqkfz863-sqlite-3.34.1-bin': No such file or directory This happens because while derivations produce every output when built, you might not have them if you didn't build the derivation yourself (for instance, the store path was fetch from a binary cache). This uses outputName provided from DerivationInfo which appears to match the first output of the derivation.
2021-05-05Properly normalize the content-addressed pathsregnat
Make sure that their timestamp are always normalized. Otherwise, strange − and non-deterministic − things might happen, like https://github.com/NixOS/nixpkgs/issues/121813 Fix #4775
2021-05-04launchd: Use exec to avoid leaving the extra shell wrapper runningAnders Kaseorg
Before: UID PID PPID C STIME TTY TIME CMD 0 1737 1 0 2:28PM ?? 0:00.00 /bin/sh -c /bin/wait4path /nix/var/nix/profiles/default/bin/nix-daemon && /nix/var/nix/profiles/default/bin/nix-daemon 0 1739 1737 0 2:28PM ?? 0:00.05 /nix/var/nix/profiles/default/bin/nix-daemon After: UID PID PPID C STIME TTY TIME CMD 0 1763 1 0 2:29PM ?? 0:00.05 /nix/var/nix/profiles/default/bin/nix-daemon Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-05-04Merge pull request #4767 from NixOS/fix-s3-ca-cachingEelco Dolstra
Fix the double-slash in the realisations path
2021-05-04Fix the double-slash in the realisations pathregnat
Make sure that we always access the realisations under `binaryCacheUrl/realisations` and not `binaryCacheUrl//realisations` Fix #4766
2021-05-03Merge pull request #4750 from NinjaTrappeur/nin-build-dry-run-jsonEelco Dolstra
nix build: make dry-run to print a json output if --json is enabled
2021-05-03Merge pull request #4761 from ↵Eelco Dolstra
emilazy/issue-4658-mark-impure-host-deps-as-optional Mark `__impureHostDeps` paths as optional
2021-05-03Merge pull request #4763 from Ma27/fix-nix-shell-errorEelco Dolstra
Bump version number for `DerivedPath` changes
2021-05-03Bump version number for `DerivedPath` changesMaximilian Bosch
I guess I misunderstood John's initial explanation about why wildcards for outputs are sent to older stores[1]. My `nix-daemon` from 2021-03-26 also has version 1.29, but misses the wildcard[2]. So bumping seems to be the right call. [1] https://github.com/NixOS/nix/pull/4759#issuecomment-830812464 [2] 255d145ba7ac907d1cba8d088da556b591627756
2021-05-02Mark `__impureHostDeps` paths as optionalEmily
Starting in macOS 11, the on-disk dylib bundles are no longer available, but nixpkgs needs to be able to keep compatibility with older versions that require `/usr/lib/libSystem.B.dylib` in `__impureHostDeps`. Allow it to keep backwards compatibility with these versions by marking these dependencies as optional. Fixes #4658.
2021-04-29Merge pull request #4289 from abathur/encrypt_darwin_volumeGraham Christensen
darwin: encrypt nix volume if filevault is enabled
2021-04-29darwin: encrypt nix volume if filevault is enabledTravis A. Everett
2021-04-27Merge pull request #4751 from Ma27/storepath-posDomen Kožar
primops/storePath: add trace to pure mode error
2021-04-27primops/storePath: add trace to pure mode errorMaximilian Bosch
As described in #4745 it's otherwise fairly hard to understand where this is coming from. Say you have an expression which uses e.g. `types.package`: ``` nix { outputs = { self, nixpkgs }: { packages.x86_64-linux.hello = let foo = nixpkgs.lib.evalModules { modules = [ { options.foo.bar = with nixpkgs.lib; mkOption { type = types.package; }; } { foo.bar = ./.; } ]; }; in builtins.trace foo.config.foo.bar.outPath nixpkgs.legacyPackages.x86_64-linux.hello; defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello; }; } ``` Then you'll get an error trace like this: ``` error: 'builtins.storePath' is not allowed in pure evaluation mode at /nix/store/p4h2x6r80njkb0j2rc1xjhhl99yri3zb-source/lib/attrsets.nix:328:15: 327| let 328| path' = builtins.storePath path; | ^ 329| res = … while evaluating the attribute 'config.foo.bar.outPath' at /nix/store/p4h2x6r80njkb0j2rc1xjhhl99yri3zb-source/lib/attrsets.nix:332:11: 331| name = sanitizeDerivationName (builtins.substring 33 (-1) (baseNameOf path')); 332| outPath = path'; | ^ 333| outputs = [ "out" ]; … while evaluating the attribute 'packages.x86_64-linux.hello' at /nix/store/6c1rfsqzrhjw1235palzjmf5vihcpci7-source/flake.nix:3:5: 2| { outputs = { self, nixpkgs }: { 3| packages.x86_64-linux.hello = let | ^ 4| foo = nixpkgs.lib.evalModules { ``` Fixes #4745
2021-04-27nix build: make dry-run to print a json output if --json is enabledFélix Baylac-Jacqué
2021-04-23Merge branch 'remove-trailing-spaces' of github.com:NixOS/nixEelco Dolstra
2021-04-23Replace the trailing markdown spaces by a backslashregnat
They are equivalent according to <https://spec.commonmark.org/0.29/#hard-line-breaks>, and the trailing spaces tend to be a pain (because the make git complain, editors tend to want to remove them − the `.editorconfig` actually specifies that − etc..).
2021-04-23Merge pull request #4732 from NixOS/4725-always-register-the-realisationsEelco Dolstra
Aways register the realisations
2021-04-23Merge pull request #4735 from NixOS/document-ca-derivationsEelco Dolstra
(briefly) document how to build ca derivations
2021-04-23Use lowdown 0.8.4Eelco Dolstra
2021-04-23Set more man sectionsEelco Dolstra
2021-04-23Merge branch 'man1' of https://github.com/alyssais/nixEelco Dolstra
2021-04-23doc: fix section in nix3 man page metadataAlyssa Ross
These man pages said they were in section 7, even though we were installing them to section 1 (which is the right place for them).
2021-04-23Merge pull request #4440 from Ma27/misc-pos-fixesEelco Dolstra
Miscellaneous improvements for positioning in eval-errors
2021-04-23(briefly) document how to build ca derivationsregnat
2021-04-23Revert "Make `nix shell` fallback to static outputs when needed"regnat
This reverts commit 8d66f5f1107fe87f70ea24ade045720235cc31fa. This fix isn't needed anymore now that the realisations are always properly registered
2021-04-23fixup! Add a regression test for #4725regnat
2021-04-22Always register the realisations of input-addressed drvsregnat
Fix #4725
2021-04-22Add a regression test for #4725regnat
2021-04-22Merge branch 'master' of github.com:NixOS/nixEelco Dolstra
2021-04-22Merge branch 'nix-derivation-query-store-path' of ↵Eelco Dolstra
https://github.com/matthewbauer/nix
2021-04-22Merge pull request #4724 from NixOS/nix-shell-missing-outputsEelco Dolstra
Make `nix shell` fallback to static outputs when needed
2021-04-22Remove makeDecompressionSource()Eelco Dolstra
This function doesn't support all compression methods (i.e. 'none' and 'br') so it shouldn't be exposed. Also restore the original decompress() as a wrapper around makeDecompressionSink().
2021-04-22Merge branch 's3-decompress' of https://github.com/lukegb/nixEelco Dolstra
2021-04-22Merge pull request #4729 from alarsyo/fix-flake-doc-typoEelco Dolstra
Fix typo in flake doc
2021-04-22libutil: allow decompression with none/empty methodLuke Granger-Brown
The S3 store relies on the ability to be able to decompress things with an empty method, because it just passes the value of the Content-Encoding directly to decompress. If the file is not compressed, then this will cause the compression routine to get confused. This caused NixOS/nixpkgs#120120.
2021-04-22Fix typo in flake docAntoine Martin