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, openssl,
libxcb, libxcb,
fetchFromGitHub, fetchFromGitHub,
}: let }:
rustPlatform.buildRustPackage (finalAttrs: let
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
in {
name = "emoji-picker";
version = cargoToml.package.version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "leana8959"; owner = "leana8959";
repo = "emoji-picker"; repo = "emoji-picker";
@ -13,13 +19,6 @@
hash = "sha256-ETZRqyQ5lzYA6NGOXLnxfpwb4qMMC1l7s5XA8H5s9Jw="; 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 = [ nativeBuildInputs = [
@ -31,4 +30,4 @@ in
openssl.dev openssl.dev
libxcb libxcb
]; ];
}) })