Improve nix build

This commit is contained in:
bluepython508
2025-11-01 20:00:06 +00:00
parent 5fd32e20c5
commit c023daf180
2 changed files with 9 additions and 2 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
/.direnv
*.mgc
*.typ
/result

View File

@@ -18,9 +18,10 @@
version = "0.1.0";
src = ./.;
cargoHash = lib.fakeHash;
cargoLock.lockFile = ./Cargo.lock;
buildInputs = [pkgs.zathuraPkgs.zathura_core pkgs.girara pkgs.cairo pkgs.pkg-config];
buildInputs = [pkgs.zathuraPkgs.zathura_core pkgs.girara pkgs.cairo pkgs.openssl];
nativeBuildInputs = [pkgs.perl pkgs.pkg-config];
# From https://hoverbear.org/blog/rust-bindgen-in-nix/
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
@@ -39,6 +40,11 @@
$(pkg-config --cflags zathura)
"
'';
installPhase = ''
mkdir -p $out/lib/zathura
mv target/*/release/*.so $out/lib/zathura/
'';
});
});