fix(nix): last try

This commit is contained in:
Pravdyvy 2026-06-12 18:53:53 +03:00
parent 7c49b6a861
commit e39d617e4d
2 changed files with 17 additions and 13 deletions

16
flake.lock generated
View File

@ -20,17 +20,17 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1779701503,
"narHash": "sha256-Cq+R9/cs2Nv/5q8NSH2tgNwQAiOuZK80nEhNMK0jShw=",
"lastModified": 1775835011,
"narHash": "sha256-SQDLyyRUa5J9QHjNiHbeZw4rQOZnTEo61TcaUpjtLBs=",
"owner": "logos-blockchain",
"repo": "logos-blockchain-circuits",
"rev": "2e79ac30831d89e6a349720c08d5b8b9978970e0",
"rev": "d6cf41f66500d4afc157b4f43de0f0d5bfa01443",
"type": "github"
},
"original": {
"owner": "logos-blockchain",
"repo": "logos-blockchain-circuits",
"rev": "2e79ac30831d89e6a349720c08d5b8b9978970e0",
"rev": "d6cf41f66500d4afc157b4f43de0f0d5bfa01443",
"type": "github"
}
},
@ -6352,16 +6352,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"lastModified": 1769461804,
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -14,7 +14,7 @@
crane.url = "github:ipetkov/crane";
logos-blockchain-circuits = {
url = "github:logos-blockchain/logos-blockchain-circuits?rev=2e79ac30831d89e6a349720c08d5b8b9978970e0";
url = "github:logos-blockchain/logos-blockchain-circuits/d6cf41f66500d4afc157b4f43de0f0d5bfa01443";
};
};
@ -53,6 +53,7 @@
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
src = ./.;
cargoLock = builtins.fromTOML (builtins.readFile ./Cargo.lock);
lbc_dir = logos-blockchain-circuits.packages.${system}.default;
# Parse Cargo.lock at eval time to find the locked risc0-circuit-recursion
# version and its crates.io checksum — no hardcoding required.
@ -101,9 +102,13 @@
pkgs.gnutar # Required for crane's archive operations (macOS tar lacks --sort)
pkgs.python3 # Required for correct builds now, as python is sandboxed in nix builds
];
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
LBC_LIB_DIR = "${lbc_dir}";
LOGOS_BLOCKCHAIN_CIRCUITS = "${lbc_dir}";
LBC_POC_LIB_DIR = "${lbc_dir}/poc";
LBC_POL_LIB_DIR = "${lbc_dir}/pol";
LBC_POQ_LIB_DIR = "${lbc_dir}/poq";
LBC_SIGNATURE_LIB_DIR = "${lbc_dir}/zksign";
# Point the risc0-circuit-recursion build script to the pre-fetched zip
# so it doesn't try to download it inside the sandbox.
RECURSION_SRC_PATH = "${recursionZkr}";
@ -117,7 +122,6 @@
'' + pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
export PATH="$PATH:/usr/bin"
'';
LOGOS_BLOCKCHAIN_CIRCUITS = logos-blockchain-circuits.packages.${system}.default;
};
walletFfiPackage = craneLib.buildPackage (
@ -144,7 +148,7 @@
cargoExtraArgs = "-p indexer_ffi";
postInstall = ''
mkdir -p $out/include
cp indexer/ffi/indexer_ffi.h $out/include/
cp lez/indexer/ffi/indexer_ffi.h $out/include/
''
+ pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
install_name_tool -id @rpath/libindexer_ffi.dylib $out/lib/libindexer_ffi.dylib