about summary refs log tree commit diff
path: root/perl/lib/Nix/Store.xs
AgeCommit message (Collapse)AuthorFilesLines
2017-04-13 Initialise loggerEelco Dolstra1-1/+0
2017-02-16 Move netrcFile to SettingsEelco Dolstra1-1/+0
Also get rid of Settings::processEnvironment(), it appears to be useless.
2016-07-26 makeFixedOutputPath(): Drop superfluous HashType argumentEelco Dolstra1-2/+2
2016-06-01 Make the store directory a member variable of StoreEelco Dolstra1-3/+2
2016-05-31 nix-copy-closure / build-remote.pl: Disable signature checkingEelco Dolstra1-2/+2
This restores the Nix 1.11 behaviour.
2016-05-04 Fix segfault in nix-copy-closureEelco Dolstra1-1/+2
2016-05-04 Remove OpenSSL-based signingEelco Dolstra1-3/+3
2016-04-19 Move path info caching from BinaryCacheStore to StoreEelco Dolstra1-11/+10
Caching path info is generally useful. For instance, it speeds up "nix path-info -rS /run/current-system" (i.e. showing the closure sizes of all paths in the closure of the current system) from 5.6s to 0.15s. This also eliminates some APIs like Store::queryDeriver() and Store::queryReferences().
2016-02-26 importPaths(): Optionally add NARs to binary cache accessorEelco Dolstra1-1/+1
This enables an optimisation in hydra-queue-runner, preventing a download of a NAR it just uploaded to the cache when reading files like hydra-build-products.
2016-02-16 Add C++ functions for .narinfo processing / signingEelco Dolstra1-10/+4
This is currently only used by the Hydra queue runner rework, but like eff5021eaa6dc69f65ea1a8abe8f3ab11ef5eb0a it presumably will be useful for the C++ rewrite of nix-push and download-from-binary-cache. (@shlevy)
2016-02-16 Rename ValidPathInfo::hash -> narHash for consistencyEelco Dolstra1-1/+1
2016-02-15 Fix nix-copy-closureEelco Dolstra1-0/+1
http://hydra.nixos.org/build/32005971
2016-02-04 StoreAPI -> StoreEelco Dolstra1-3/+3
Calling a class an API is a bit redundant...
2016-02-04 Eliminate the "store" global variableEelco Dolstra1-36/+23
Also, move a few free-standing functions into StoreAPI and Derivation. Also, introduce a non-nullable smart pointer, ref<T>, which is just a wrapper around std::shared_ptr ensuring that the pointer is never null. (For reference-counted values, this is better than passing a "T&", because the latter doesn't maintain the refcount. Usually, the caller will have a shared_ptr keeping the value alive, but that's not always the case, e.g., when passing a reference to a std::thread via std::bind.)
2016-01-07 Fix bad use of croak()Eelco Dolstra1-22/+22
Detected by -Werror=format-security. http://hydra.nixos.org/build/29973207
2015-10-09 Provide addTempRoot in the Perl APIEelco Dolstra1-0/+10
Needed by Hydra.
2015-06-03 Handle base-16 NarHash fields in signed .narinfo filesEelco Dolstra1-0/+11
2015-03-25 addToStore(): Take explicit name argumentEelco Dolstra1-1/+1
2015-03-04 Reduce verbosity in build-remote.plEelco Dolstra1-0/+5
2015-02-10 Make libsodium an optional dependencyEelco Dolstra1-0/+10
2015-02-04 Use libsodium instead of OpenSSL for binary cache signingEelco Dolstra1-0/+40
Sodium's Ed25519 signatures are much shorter than OpenSSL's RSA signatures. Public keys are also much shorter, so they're now specified directly in the nix.conf option ‘binary-cache-public-keys’. The new command ‘nix-store --generate-binary-cache-key’ generates and prints a public and secret key.
2014-07-11 build-remote.pl: Use ‘nix-store --serve’ on the remote sideEelco Dolstra1-0/+11
This makes things more efficient (we don't need to use an SSH master connection, and we only start a single remote process) and gets rid of locking issues (the remote nix-store process will keep inputs and outputs locked as long as they're needed). It also makes it more or less secure to connect directly to the root account on the build machine, using a forced command (e.g. ‘command="nix-store --serve --write"’). This bypasses the Nix daemon and is therefore more efficient. Also, don't call nix-store to import the output paths.
2014-01-21 Ugly hack to fix building with clangEelco Dolstra1-0/+4
2013-12-20 perl: Call loadConfFile() in doInit to avoid screwing sqlite journal mode.Petr Rockai1-0/+2
If the database is opened through perl bindings (and even though nix.conf has use-sqlite-wal set to false), the database is automatically converted into WAL mode. This makes the next nix process to access the database convert it back to "truncate". If the database is still open at the time in wal mode by the perl program, this fails and crashes the nix doing the wal -> truncate conversion.
2013-09-06 Don't apply the CPU affinity hack to nix-shell (and other Perl programs)Eelco Dolstra1-0/+1
As discovered by Todd Veldhuizen, the shell started by nix-shell has its affinity set to a single CPU. This is because nix-shell connects to the Nix daemon, which causes the affinity hack to be applied. So we turn this off for Perl programs.
2013-03-08 Revert "Prevent config.h from being clobbered"Eelco Dolstra1-9/+12
This reverts commit 28bba8c44f484eae38e8a15dcec73cfa999156f6.
2013-03-07 Prevent config.h from being clobberedEelco Dolstra1-12/+9
2013-02-05 Nix::Store::derivationFromPath: Return derivation outputsEelco Dolstra1-9/+12
2012-07-30 Refactor settings processingEelco Dolstra1-1/+1
Put all Nix configuration flags in a Settings object.
2012-07-17 Add function queryPathFromHashPart()Eelco Dolstra1-0/+11
To implement binary caches efficiently, Hydra needs to be able to map the hash part of a store path (e.g. "gbg...zr7") to the full store path (e.g. "/nix/store/gbg...kzr7-subversion-1.7.5"). (The binary cache mechanism uses hash parts as a key for looking up store paths to ensure privacy.) However, doing a search in the Nix store for /nix/store/<hash>* is expensive since it requires reading the entire directory. queryPathFromHashPart() prevents this by doing a cheap database lookup.
2012-07-17 queryPathInfo(): return hash in base-32 if desiredEelco Dolstra1-2/+2
Cherry-picked from the no-manifests branch.
2012-03-19 Add a command "nix-build --run-env" to reproduce the environment of a derivationEelco Dolstra1-0/+42
This command builds or fetches all dependencies of the given derivation, then starts a shell with the environment variables from the derivation. This shell also sources $stdenv/setup to initialise the environment further. The current directory is not changed. Thus this is a convenient way to reproduce a build environment in an existing working tree. Existing environment variables are left untouched (unless the derivation overrides them). As a special hack, the original value of $PATH is appended to the $PATH produced by $stdenv/setup. Example session: $ nix-build --run-env '<nixpkgs>' -A xterm (the dependencies of xterm are built/fetched...) $ tar xf $src $ ./configure $ make $ emacs (... hack source ...) $ make $ ./xterm
2011-12-02 * Add some more functions to the Perl bindings.Eelco Dolstra1-0/+46
2011-11-29 * download-using-manifests: use the Perl bindings.Eelco Dolstra1-0/+11
2011-11-29 * For consistency with "nix-store -q --hash", produce hashes inEelco Dolstra1-1/+1
base-32. (This affects Hydra manifests.)
2011-11-23 * Add an API function exportPaths() that provides the functionality ofEelco Dolstra1-0/+13
‘nix-store --export’. * Add a Perl module that provides the functionality of ‘nix-copy-closure --to’. This is used by build-remote.pl so it no longer needs to start a separate nix-copy-closure process. Also, it uses the Perl API to do the export, so it doesn't need to start a separate nix-store process either. As a result, nix-copy-closure and build-remote.pl should no longer fail on very large closures due to an "Argument list too long" error. (Note that having very many dependencies in a single derivation can still fail because the environment can become too large. Can't be helped though.)
2011-11-22 * Move initialisation of variables like nixConfDir from libmain toEelco Dolstra1-3/+1
libstore so that the Perl bindings can use it as well. It's vital that the Perl bindings use the configuration file, because otherwise nix-copy-closure will fail with a ‘database locked’ message if the value of ‘use-sqlite-wal’ is changed from the default.
2011-10-11 * Use the Store API bindings in nix-copy-closure.Eelco Dolstra1-10/+31
2011-10-10 * Include the Nix Perl bindings in Nix itself. This will allow theEelco Dolstra1-0/+129
bindings to be used in Nix's own Perl scripts. The only downside is that Perl XS and Automake/libtool don't really like each other, so building is a bit tricky.