gummy: add update script, use cmakeFeature

This commit is contained in:
John Titor 2024-10-22 17:09:05 +05:30
parent 424872f4a1
commit fc5b713c20
No known key found for this signature in database
GPG Key ID: 29B0514F4E3C1CC0

View File

@ -14,6 +14,7 @@
, fmt
, nlohmann_json
, spdlog
, nix-update-script
}:
stdenv.mkDerivation (finalAttrs: {
@ -46,8 +47,10 @@ stdenv.mkDerivation (finalAttrs: {
];
cmakeFlags = [
"-DUDEV_DIR=${placeholder "out"}/lib/udev"
"-DUDEV_RULES_DIR=${placeholder "out"}/lib/udev/rules.d"
(lib.mapAttrsToList lib.cmakeFeature {
"UDEV_DIR" = "${placeholder "out"}/lib/udev";
"UDEV_RULES_DIR" = "${placeholder "out"}/lib/udev/rules.d";
})
];
# Fixes the "gummy start" command, without this it cannot find the binary.
@ -65,6 +68,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://codeberg.org/fusco/gummy";