fix build against Nix 2.24 (#40)

* bump nixpkgs

* fix build against nix 2.24

* depend on nix 2.24
This commit is contained in:
Jörg Thalheim 2024-12-02 15:12:47 +01:00 committed by GitHub
parent 578ad85b30
commit 6e8d82a451
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,7 @@
#include <cstddef>
#include <cstdlib>
#include <nix/store-api.hh>
#include <nix/shared.hh>
#include <nix/log-store.hh>
#include "nix.hh"
@ -14,8 +15,7 @@ static ref<Store> getStore()
static std::shared_ptr<Store> _store;
if (!_store) {
initLibStore();
loadConfFile();
initLibStore(true);
_store = openStore();
}
@ -120,7 +120,7 @@ void queryPathInfo
output->deriver = emptyString;
};
copyString(validPathInfo->narHash.to_string(Base32, true), &output->narHash);
copyString(validPathInfo->narHash.to_string(nix::HashFormat::Nix32, true), &output->narHash);
output->narSize = validPathInfo->narSize;

6
flake.lock generated
View File

@ -18,11 +18,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1700856099,
"narHash": "sha256-RnEA7iJ36Ay9jI0WwP+/y4zjEhmeN6Cjs9VOFBH7eVQ=",
"lastModified": 1732238832,
"narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1",
"rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d",
"type": "github"
},
"original": {

View File

@ -35,6 +35,7 @@
(old: {
executableSystemDepends = (old.executableSystemDepends or []) ++ [
final.boost.dev
final.nixVersions.nix_2_24
];
});
})

View File

@ -36,7 +36,7 @@ executable nix-serve
cxx-sources: cbits/nix.cpp
, cbits/nix.hh
cxx-options: -std=c++17
cxx-options: -std=c++20
build-depends: base < 5
, base16 >= 1.0