aboutsummaryrefslogtreecommitdiff
path: root/perl
AgeCommit message (Collapse)Author
2024-05-29util.hh: Delete remaining file and clean up headersTom Hubrecht
Change-Id: Ic1f68e6af658e94ef7922841dd3ad4c69551ef56
2024-05-23packaging: rename nixexpr -> lixexpr and so onJade Lovelace
This breaks downstreams linking to us on purpose to make sure that if someone is linking to Lix they're doing it on purpose and crucially not mixing up Nix and Lix versions in compatibility code. We still need to fix the internal includes to follow the same schema so we can drop the single-level include system entirely. However, this requires a little more effort. This adds pkg-config for libfetchers and config.h. Migration path: expr.hh -> lix/libexpr/expr.hh nix/config.h -> lix/config.h To apply this migration automatically, remove all `<nix/>` from includes, so: `#include <nix/expr.hh>` -> `#include <expr.hh>`. Then, the correct paths will be resolved from the tangled mess, and the clang-tidy automated fix will work. Then run the following for out of tree projects: ``` lix_root=$HOME/lix (cd $lix_root/clang-tidy && nix develop -c 'meson setup build && ninja -C build') run-clang-tidy -checks='-*,lix-fixincludes' -load=$lix_root/clang-tidy/build/liblix-clang-tidy.so -p build/ -fix src ``` Related: https://git.lix.systems/lix-project/nix-eval-jobs/pulls/5 Fixes: https://git.lix.systems/lix-project/lix/issues/279 Change-Id: I7498e903afa6850a731ef8ce77a70da6b2b46966
2024-05-07remove the autoconf+Make buildsystemQyriad
We're not using it anymore. Any leftover bugs in the Meson buildsystem are now just bugs. Closes #249. Change-Id: I0465a0c37ae819f94d40e7829f5bff046aa63d73
2024-04-08Format Nix code with `nixfmt`Rebecca Turner
Change-Id: I61efeb666ff7481c05fcb247168290e86a250151
2024-04-02meson: implement perl bindingsQyriad
Change-Id: Ie1bfb0aa784e6136a82d518a652d0ae60c4b047a
2024-03-30perl: put perl dependencies in buildInputs instead of manually passing them ↵Qyriad
to configure Perl has an env hook[1]. Passing the paths manually without putting them in buildInputs is harder to understand, plays less nicely with dev shells, and is less build-generic. Produced identical output on my x86_64-linux machine, and on my aarch64-darwin machine was identical save for the derivation output path which gets embedded into the .dylib Mach-O. Change-Id: Ib313caa5a6f0b0e3154ce6f05379033920d0d290
2024-03-04Merge pull request #9152 from obsidiansystems/split-out-perl-nixeldritch horrors
Factor out Perl bindings Nix package (cherry picked from commit d12c614ac75171421844f3706d89913c3d841460) Change-Id: Ie75ccfec8cc815ea95ae9848cb03e33aa8cee5ae
2024-03-04Merge pull request #9106 from Ericson2314/positive-source-filteringeldritch horrors
Use positive source filtering for the standalone functional tests job and Perl bindings (cherry picked from commit 6b6bd9003062c86a49d4384381941cf57f269c45) Change-Id: I896be67654f893d543ed6beb5d0d0d6c6d36e027
2023-09-07Allow dynamic derivation deps in `inputDrvs`John Ericson
We use the same nested map representation we used for goals, again in order to save space. We might someday want to combine with `inputDrvs`, by doing `V = bool` instead of `V = std::set<OutputName>`, but we are not doing that yet for sake of a smaller diff. The ATerm format for Derivations also needs to be extended, in addition to the in-memory format. To accomodate this, we added a new basic versioning scheme, so old versions of Nix will get nice errors. (And going forward, if the ATerm format changes again the errors will be even better.) `parsedStrings`, an internal function used as part of parsing derivations in A-Term format, used to consume the final `]` but expect the initial `[` to already be consumed. This made for what looked like unbalanced brackets at callsites, which was confusing. Now it consumes both which is hopefully less confusing. As part of testing, we also created a unit test for the A-Term format for regular non-experimental derivations too. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Apply suggestions from code review Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-07Simplify `ContentAddress`John Ericson
Whereas `ContentAddressWithReferences` is a sum type complex because different varieties support different notions of reference, and `ContentAddressMethod` is a nested enum to support that, `ContentAddress` can be a simple pair of a method and hash. `ContentAddress` does not need to be a sum type on the outside because the choice of method doesn't effect what type of hashes we can use. Co-Authored-By: Cale Gibbard <cgibbard@gmail.com>
2023-04-17Merge pull request #3746 from obsidiansystems/path-infoRobert Hensing
Introduce `StoreReferences` and `ContentAddressWithReferences`
2023-04-07libstore: Remove lockCPU dead codeRobert Hensing
Left over from 9747ea84b, https://github.com/NixOS/nix/pull/5821
2023-04-07Move loadConfFile() to initLibStoreRobert Hensing
Part of an effort to make it easier to initialize the right things, by moving code into the appropriate libraries. Using libstore without loading the config file is risky, as sqlite may then be misconfigured. See https://github.com/cachix/cachix/issues/475
2023-02-28No inheritance for `TextInfo` and `FixedOutputInfo`John Ericson
2023-02-28Revert "Remove some designated initializers"John Ericson
This reverts commit ee9eb83a842eb97d0180fd9d349d30ff27fdb485.
2023-02-28Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2023-02-10Fix building with GCC 9Eelco Dolstra
Nixpkgs on aarch64-linux is currently stuck on GCC 9 (https://github.com/NixOS/nixpkgs/issues/208412) and using gcc11Stdenv doesn't work either. So use c++2a instead of c++20 for now. Unfortunately this means we can't use some C++20 features for now (like std::span).
2023-02-03Merge pull request #7705 from Ma27/fix-initNix-in-perl-bindingsRobert Hensing
perl: run `initLibStore()` on `openStore()`
2023-02-02perl: run `initLibStore()` on `openStore()`Maximilian Bosch
Since #7478 it's mandatory that `initLibStore()` is called for store operations. However that's not the case when running `openStore()` in Perl using the perl-bindings. That breaks e.g. `hydra-eval-jobset` when built against Nix 2.13 which uses small portions of the store API.
2023-02-01Remove some designated initializersJohn Ericson
With the switch to C++20, the rules became more strict, and we can no longer initialize base classes. Make them comments instead. (BTW https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2287r1.html this offers some new syntax for this use-case. Hopefully this will be adopted and we can eventually use it.)
2023-02-01Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2023-01-14Make `ValidPathInfo` have plain `StorePathSet` references like beforeJohn Ericson
This change can wait for another PR.
2023-01-06Fix perl bindingsJohn Ericson
2023-01-06Use named field initialization for referencesJohn Ericson
2022-10-22Build with C++20Graham Bennett
2022-03-10Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2022-02-25Remove std::string alias (for real this time)Eelco Dolstra
Also use std::string_view in a few more places.
2021-11-27Document libsodium, which is now mandatory, as a dependencyAlexander Sosedkin
2021-11-23Add missing Nix::Store import to fix nix-serve StoreDir.Ben Radford
2021-09-30Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2021-07-30Expose a perl method to query a derivationregnat
Just doing a very stupid thing taking as argument a serialised drv output and returning a serialised realisation. This is needed for `nix-serve` to handle ca derivations
2021-07-15Fix perl bindings buildEelco Dolstra
2021-06-23Apply OS checks to host platform, not buildAlyssa Ross
Previously, the build system used uname(1) output when it wanted to check the operating system it was being built for, which meant that it didn't take into-account cross-compilation when the build and host operating systems were different. To fix this, instead of consulting uname output, we consult the host triple, specifically the third "kernel" part. For "kernel"s with stable ABIs, like Linux or Cygwin, we can use a simple ifeq to test whether we're compiling for that system, but for other platforms, like Darwin, FreeBSD, or Solaris, we have to use a more complicated check to take into account the version numbers at the end of the "kernel"s. I couldn't find a way to just strip these version numbers in GNU Make without shelling out, which would be even more ugly IMO. Because these checks differ between kernels, and the patsubst ones are quite fiddly, I've added variables for each host OS we might want to check to make them easier to reuse.
2021-02-25Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2021-01-06Make sodium a required dependencyEelco Dolstra
2020-11-21Return signatures in Perl path infoKai Wohlfahrt
2020-10-07Use PathReferences more widelyJohn Ericson
2020-09-17Remove corepkgs/config.nixEelco Dolstra
This isn't used anywhere except in the configure script of the Perl bindings. I've changed the latter to use the C++ API's Settings object at runtime.
2020-08-28Merge remote-tracking branch 'upstream/master' into single-ca-drv-buildJohn Ericson
2020-08-18Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-08-14Merge remote-tracking branch 'upstream/master' into single-ca-drv-buildJohn Ericson
2020-08-14Merge pull request #3875 from obsidiansystems/new-interface-for-path-pathOptEelco Dolstra
Offer a safer interface for path and pathOpt
2020-08-08Fix perl FFI for floating ca derivationsJohn Ericson
Path is null when not known statically.
2020-08-05Fix perl integrationCarlo Nucera
2020-08-05Merge branch 'master' of github.com:NixOS/nix into ↵Carlo Nucera
new-interface-for-path-pathOpt
2020-08-01Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-07-28Merge branch 'misc-ca' of github.com:obsidiansystems/nix into ↵Carlo Nucera
new-interface-for-path-pathOpt
2020-07-28Use the new interfaceCarlo Nucera
2020-07-27Merge branch 'hash-always-has-type' of github.com:obsidiansystems/nix into ↵John Ericson
better-ca-parse-errors
2020-07-27Merge remote-tracking branch 'upstream/master' into hash-always-has-typeJohn Ericson