packages: refactor cargo rust packages

This commit is contained in:
Primrose 2025-07-28 12:11:02 +02:00
parent 318ca4fbc6
commit b9639eb49c
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
4 changed files with 42 additions and 34 deletions

View file

@ -8,6 +8,7 @@
}:
rustPlatform.buildRustPackage (finalAttrs: let
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
cargoLock = finalAttrs.src + "/Cargo.lock";
in {
pname = "emoji-picker";
version = cargoToml.package.version;
@ -19,7 +20,7 @@ in {
hash = "sha256-ETZRqyQ5lzYA6NGOXLnxfpwb4qMMC1l7s5XA8H5s9Jw=";
};
cargoHash = "sha256-rJKFRWaqulnan2jtt0erj5cypSBe0Z5PiNcOXd3HCZs=";
cargoLock.lockFile = cargoLock;
nativeBuildInputs = [
python3