feat: switch to crane

This commit is contained in:
uku 2025-05-09 22:32:09 +02:00
parent ed69a54524
commit 837ce3ab3e
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
3 changed files with 33 additions and 9 deletions

View file

@ -1,23 +1,21 @@
{
lib,
rustPlatform,
mold-wrapped,
self,
lib,
craneLib,
mold-wrapped,
}:
let
cargoToml = lib.importTOML ./Cargo.toml;
rev = self.shortRev or self.dirtyShortRev or "dirty";
in
rustPlatform.buildRustPackage {
craneLib.buildPackage {
pname = cargoToml.package.name;
version = "${cargoToml.package.version}+git.${rev}";
src = self;
src = craneLib.cleanCargoSource ./.;
nativeBuildInputs = [ mold-wrapped ];
cargoLock.lockFile = ./Cargo.lock;
RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
doCheck = false;