Age | Commit message (Collapse) | Author |
|
|
|
This was a suggested course of action in a review in one of our earlier
commits, https://github.com/NixOS/nix/pull/3801#discussion_r457557079
|
|
|
|
|
|
This reverts commit 74b251b2f3d6414de051c8523011c0ee3c5ea154.
|
|
|
|
github.com:Ericson2314/nix into misc-ca
|
|
optional-derivation-output-storepath
|
|
We use this to simplify `LocalStore::addToStoreFromDump`.
Also, hope I fixed build error with old clang (used in Darwin CI).
|
|
|
|
This reverts commit 592851fb67cd15807109d6f65fb81f6af89af966. We don't
need this extra feature anymore
|
|
I got it to just become `LocalStore::addToStoreFromDump`, cleanly taking
a store and then doing nothing too fancy with it.
`LocalStore::addToStore(...Path...)` is now just a simple wrapper with a
bare-bones sinkToSource of the right dump command.
|
|
from-dump-stream
|
|
This reverts commit a2c27022e9afc394e08d34d349587c8903fc1a97. See
addToStoreSlow(), we don't need to handle this case efficiently
anymore. In fact, we can almost remove the method/hashAlgo arguments
since the non-recursive and/or non-SHA256 are almost not used anymore.
|
|
|
|
We were calculating the nar hash wrong when the file ingestion method
was flat. I don't think there's anything we can do in that case but dump
the file again, so that's what I do.
As an optomization, we again could reuse the original dump for just the
recursive and non-sha256 case, but I rather do that after this fix, and
after my other PRs which deduplicate this code.
|
|
Rather than copying byte-by-byte, we let the coroutine know how much
data we would like it to send back to us.
|
|
The downsides is that the coroutine has byte-by-byte loop transfer. Will
fix that next.
|
|
I just as little beyond the type as possible, so the implementation
changes this enables can be reviewed separately.
|
|
|
|
This is only used by hydra-queue-runner and it's better to implement
it there.
|
|
optional-derivation-output-storepath
|
|
This helps nix-prefetch-url when using a local store.
|
|
we don’t need a full storepath for a fixedoutput derivation. So just
putting the ingestion method + the hash is sufficient.
|
|
|
|
This reduces memory consumption of
nix-instantiate \
-E 'with import <nixpkgs> {}; runCommand "foo" { src = ./blender; } "echo foo"' \
--option nar-buffer-size 10000
(where ./blender is a 1.1 GiB tree) from 1716 to 36 MiB, while still
ensuring that we don't do any write I/O for small source paths (up to
'nar-buffer-size' bytes). The downside is that large paths are now
always written to a temporary location in the store, even if they
produce an already valid store path. Thus, adding large paths might be
slower and run out of disk space. ¯\_(ツ)_/¯ Of course, you can always
restore the old behaviour by setting 'nar-buffer-size' to a very high
value.
|
|
|
|
|
|
Generalize `queryDerivationOutputNames` and `queryDerivationOutputs` by
adding a `queryDerivationOutputMap` that returns the map
`outputName=>outputPath`
(not that this is not equivalent to merging the results of
`queryDerivationOutputs` and `queryDerivationOutputNames` as sets don't
preserve the order, so we would end up with an incorrect mapping).
squash! Add a way to get all the outputs of a derivation with their label
Rename StorePathMap to OutputPathMap
|
|
|
|
|
|
multi-output-hashDerivationModulo
|
|
|
|
|
|
validPathInfo-ca-proper-datatype
|
|
|
|
|
|
Not a regular git revert as there have been many merges and things.
|
|
|
|
|
|
|
|
no-stringly-typed-derivation-output
|
|
multi-output-hashDerivationModulo
|
|
|
|
|
|
On nix-env -qa -f '<nixpkgs>', this reduces maximum RSS by 20970 KiB
and runtime by 0.8%. This is mostly because we're not parsing the hash
part as a hash anymore (just validating that it consists of base-32
characters).
Also, replace storePathToHash() by StorePath::hashPart().
|
|
|
|
|
|
|
|
This function was used in only one place, where it could easily be
replaced by readDerivation() since it's not
performance-critical. (This function appears to have been modelled
after queryDerivationOutputs(), which exists only to make the garbage
collector faster.)
|