packages/emoji-picker-rs: refactor using finalAttrs

This commit is contained in:
Primrose 2025-07-28 11:41:29 +02:00
parent 21c920be35
commit db61f9d4b9
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -5,7 +5,13 @@
openssl,
libxcb,
fetchFromGitHub,
}: let
}:
rustPlatform.buildRustPackage (finalAttrs: let
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
in {
name = "emoji-picker";
version = cargoToml.package.version;
src = fetchFromGitHub {
owner = "leana8959";
repo = "emoji-picker";
@ -13,22 +19,15 @@
hash = "sha256-ETZRqyQ5lzYA6NGOXLnxfpwb4qMMC1l7s5XA8H5s9Jw=";
};
cargoToml = fromTOML (builtins.readFile (src + "/Cargo.toml"));
in
rustPlatform.buildRustPackage (finalAttrs: {
name = "emoji-picker";
version = cargoToml.package.version;
inherit src;
cargoHash = "sha256-rJKFRWaqulnan2jtt0erj5cypSBe0Z5PiNcOXd3HCZs=";
cargoHash = "sha256-rJKFRWaqulnan2jtt0erj5cypSBe0Z5PiNcOXd3HCZs=";
nativeBuildInputs = [
python3
pkg-config
];
nativeBuildInputs = [
python3
pkg-config
];
buildInputs = [
openssl.dev
libxcb
];
})
buildInputs = [
openssl.dev
libxcb
];
})