aboutsummaryrefslogtreecommitdiff
path: root/perl
AgeCommit message (Collapse)Author
2020-07-08Only store hash of fixed derivation outputMatthew Bauer
we don’t need a full storepath for a fixedoutput derivation. So just putting the ingestion method + the hash is sufficient.
2020-07-05See if setting -std=c++17 for perl bindings helpsJohn Ericson
2020-07-03Fix Perl, again...John Ericson
2020-07-03Fix PerlJohn Ericson
2020-06-19WIP: Make Hash always store a valid hash typeJohn Ericson
2020-06-03libutils/hash: remove default encodingzimbatm
This will make it easier to reason about the hash encoding and switch to SRI everywhere where possible.
2020-03-30Get rid of FileIngestionMethod casts in perl bindings, tooJohn Ericson
2020-03-29Replace some `bool recursive` with a new `FileIngestionMethod` enumJohn Ericson
2020-03-10nix-perl: Fix segfault in queryPathInfo)Eelco Dolstra
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-11-26Clean up the configure scriptEelco Dolstra
2019-11-07Fix Perl bindingsEelco Dolstra
2019-11-07Revert "autoconf: Allow overriding CFLAGS/CXXFLAGS from outside."Eelco Dolstra
This reverts commit 717e821b99797845e1bef47d862f8cb0fb69cfc9. It's much more convenient to do 'make OPTIMIZE=0'.
2019-07-03autoconf: Allow overriding CFLAGS/CXXFLAGS from outside.Niklas Hambüchen
As is normal for autoconf-based projects. For example, it is a common use case to do ./configure CXXFLAGS=-O0 This did not work for nix until now, because the `CXXFLAGS=` declaration would unconditionally erase what the user had specified. The custom `OPTIMIZE` flag is removed, but the default `-O3` is retained; autoconf would default to `-g -O2` by default otherwise as documented on: https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C-Compiler.html https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C_002b_002b-Compiler.html
2019-03-25perl/configure.ac: fix for new version location tooWill Dietz
2018-05-30Modularize config settingsEelco Dolstra
Allow global config settings to be defined in multiple Config classes. For example, this means that libutil can have settings and evaluator settings can be moved out of libstore. The Config classes are registered in a new GlobalConfig class to which config files etc. are applied. Relevant to https://github.com/NixOS/nix/issues/2009 in that it removes the need for ad hoc handling of useCaseHack, which was the underlying cause of that issue.
2018-03-20ask autotools for c++14 support flags, not c++11; don't override laterWill Dietz
2017-07-30Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-04Support base-64 hashesEelco Dolstra
Also simplify the Hash API. Fixes #1437.
2017-05-03perl-bindings: Remove unused --with-store-dir flagEelco Dolstra
2017-04-26Simplify building nix-perl in nix-shellEelco Dolstra
2017-04-14Fix Perl bindingsEelco Dolstra
2017-04-13Convert Settings to the new config systemEelco Dolstra
This makes all config options self-documenting. Unknown or unparseable config settings and --option flags now cause a warning.
2017-04-13Initialise loggerEelco Dolstra
2017-04-11Drop WWW::Curl dependencyEelco Dolstra
Somehow this came back after d1da6967b8891763ce04d668027cf300c9bbf0b2.
2017-03-31Fix perl buildEelco Dolstra
2017-03-31Merge branch 'remove-perl' of https://github.com/shlevy/nixEelco Dolstra
2017-03-21Restore cache.nixos.org as the default substituterEelco Dolstra
Fixes #1283.
2017-02-16Move netrcFile to SettingsEelco Dolstra
Also get rid of Settings::processEnvironment(), it appears to be useless.
2017-02-07Add nix-perl package for the perl bindingsShea Levy
2016-11-26Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25Get rid of unicode quotes (#1140)Guillaume Maudoux
2016-07-26makeFixedOutputPath(): Drop superfluous HashType argumentEelco Dolstra
2016-06-01Make the store directory a member variable of StoreEelco Dolstra
2016-05-31nix-copy-closure / build-remote.pl: Disable signature checkingEelco Dolstra
This restores the Nix 1.11 behaviour.
2016-05-31nix-copy-closure: Drop Nix <= 1.7 compatEelco Dolstra
2016-05-04Fix segfault in nix-copy-closureEelco Dolstra
2016-05-04Remove OpenSSL-based signingEelco Dolstra
2016-04-19Move path info caching from BinaryCacheStore to StoreEelco Dolstra
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-04-11Remove manifest supportEelco Dolstra
Manifests have been superseded by binary caches for years. This also gets rid of nix-pull, nix-generate-patches and bsdiff/bspatch.
2016-02-26importPaths(): Optionally add NARs to binary cache accessorEelco Dolstra
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-16Add C++ functions for .narinfo processing / signingEelco Dolstra
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-16Rename ValidPathInfo::hash -> narHash for consistencyEelco Dolstra
2016-02-15Fix nix-copy-closureEelco Dolstra
http://hydra.nixos.org/build/32005971
2016-02-04StoreAPI -> StoreEelco Dolstra
Calling a class an API is a bit redundant...
2016-02-04Eliminate the "store" global variableEelco Dolstra
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-07Fix bad use of croak()Eelco Dolstra
Detected by -Werror=format-security. http://hydra.nixos.org/build/29973207
2015-10-09Provide addTempRoot in the Perl APIEelco Dolstra
Needed by Hydra.
2015-09-18Shut up clang warningsEelco Dolstra
2015-06-03Handle base-16 NarHash fields in signed .narinfo filesEelco Dolstra