feat: Improve legacyPackage function

This commit is contained in:
ulic-youthlic 2025-11-02 07:21:08 +08:00
parent 5de4c827d8
commit 7be2edee33
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
7 changed files with 29 additions and 11 deletions

27
pkgs/spotifyd'.nix Normal file
View file

@ -0,0 +1,27 @@
{
srcs,
spotifyd,
rustPlatform,
...
}:
let
inherit (srcs.spotifyd) src date version;
in
spotifyd.overrideAttrs (
_final: prev: {
inherit src;
version =
if prev.version != "0.4.1" then
throw ''
Please remove <pkgs/spotifyd.nix>
''
else
"0-unstable-${date}-git${version}";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (prev)
src
;
hash = "sha256-WwShp1ebk89cBqRXqKDgbwGZraCDjQAOxoL4uEIq2aw=";
};
}
)