mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Build vendoredCrates in the overlay
This makes it build on non-x86_64-linux systems (needed in GitHub actions).
This commit is contained in:
parent
3e1abf4f05
commit
db34445c5e
1 changed files with 7 additions and 9 deletions
16
flake.nix
16
flake.nix
|
@ -131,7 +131,7 @@
|
|||
patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
|
||||
''}
|
||||
|
||||
ln -sfn ${self.hydraJobs.vendoredCrates}/vendor/ nix-rust/vendor
|
||||
ln -sfn ${final.nixVendoredCrates}/vendor/ nix-rust/vendor
|
||||
|
||||
(cd perl; autoreconf --install --force --verbose)
|
||||
'';
|
||||
|
@ -188,16 +188,10 @@
|
|||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
hydraJobs = {
|
||||
|
||||
# Create a "vendor" directory that contains the crates listed in
|
||||
# Cargo.lock, and include it in the Nix tarball. This allows Nix
|
||||
# to be built without network access.
|
||||
vendoredCrates =
|
||||
with nixpkgsFor.x86_64-linux;
|
||||
|
||||
nixVendoredCrates =
|
||||
let
|
||||
lockFile = builtins.fromTOML (builtins.readFile nix-rust/Cargo.lock);
|
||||
|
||||
|
@ -206,7 +200,7 @@
|
|||
sha256 = lockFile.metadata."checksum ${pkg.name} ${pkg.version} (registry+https://github.com/rust-lang/crates.io-index)";
|
||||
}) (builtins.filter (pkg: pkg.source or "" == "registry+https://github.com/rust-lang/crates.io-index") lockFile.package);
|
||||
|
||||
in pkgs.runCommand "cargo-vendor-dir" {}
|
||||
in final.runCommand "cargo-vendor-dir" {}
|
||||
''
|
||||
mkdir -p $out/vendor
|
||||
|
||||
|
@ -238,6 +232,10 @@
|
|||
'') files)}
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
hydraJobs = {
|
||||
|
||||
# Binary package for various platforms.
|
||||
build = nixpkgs.lib.genAttrs systems (system: nixpkgsFor.${system}.nix);
|
||||
|
||||
|
|
Loading…
Reference in a new issue