feat: remove libarchieve crate depenency
This commit is contained in:
parent
c6b956ffa9
commit
1e47ef15c8
7 changed files with 365 additions and 66 deletions
19
support/gen-libarchive-sys.nix
Normal file
19
support/gen-libarchive-sys.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, zig }:
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "libarchive-sys-rs";
|
||||
src = ../gen_libarchive_sys.zig;
|
||||
dontUnpack = true;
|
||||
nativeBuildInputs = [ zig ];
|
||||
ZIG_GLOBAL_CACHE_DIR = "/build/.zig-cache";
|
||||
ZIG_LOCAL_CACHE_DIR = "/build/.zig-cache-local";
|
||||
buildPhase = ''
|
||||
${zig}/zig run "$src" \
|
||||
-target x86_64-linux-musl \
|
||||
-lc -OReleaseFast -fstrip \
|
||||
-I${pkgs.libarchive.dev}/include \
|
||||
> libarchive_sys.rs
|
||||
'';
|
||||
installPhase = ''
|
||||
cp libarchive_sys.rs "$out"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue