diff options
author | seth | 2024-06-22 07:46:37 -0400 |
---|---|---|
committer | seth | 2024-07-11 12:53:19 -0400 |
commit | 94b35a21e34232889c4ed604c8b20c845701f512 (patch) | |
tree | 0ee1a8c06d3662b6b78a9a378ff14e7e8fae58a4 /pkgs/by-name/ke | |
parent | 50ba928137ae3ba3d3f2a1839565c63ebb1d6418 (diff) |
key-rack: init at 0.4.0
Diffstat (limited to 'pkgs/by-name/ke')
-rw-r--r-- | pkgs/by-name/ke/key-rack/0001-fix-E0716.patch | 27 | ||||
-rw-r--r-- | pkgs/by-name/ke/key-rack/package.nix | 70 |
2 files changed, 97 insertions, 0 deletions
diff --git a/pkgs/by-name/ke/key-rack/0001-fix-E0716.patch b/pkgs/by-name/ke/key-rack/0001-fix-E0716.patch new file mode 100644 index 000000000000..fcbc64ddd3ad --- /dev/null +++ b/pkgs/by-name/ke/key-rack/0001-fix-E0716.patch @@ -0,0 +1,27 @@ +From 0b1d9759c43629dcd3d3a6216ea47b09516a5d84 Mon Sep 17 00:00:00 2001 +From: seth <getchoo@tuta.io> +Date: Sat, 6 Jul 2024 18:59:50 -0400 +Subject: [PATCH] fix E0716 + +doesn't seem to have popped up in upstream's CI. maybe this is only an +issue in rust versions < 1.79? +--- + src/data/item.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/data/item.rs b/src/data/item.rs +index 43dcf6f..985be74 100644 +--- a/src/data/item.rs ++++ b/src/data/item.rs +@@ -327,7 +327,7 @@ impl ItemSchema { + Self::Unknown(schema) => { + let info = crate::utils::AppInfo::new(schema); + if info.is_installed() { +- &format!("{schema}-symbolic") ++ return format!("{schema}-symbolic"); + } else { + "dialog-password-symbolic" + } +-- +2.45.1 + diff --git a/pkgs/by-name/ke/key-rack/package.nix b/pkgs/by-name/ke/key-rack/package.nix new file mode 100644 index 000000000000..dfe104303b2c --- /dev/null +++ b/pkgs/by-name/ke/key-rack/package.nix @@ -0,0 +1,70 @@ +{ + lib, + fetchFromGitLab, + stdenv, + rustPlatform, + cargo, + rustc, + libadwaita, + meson, + ninja, + nix-update-script, + pkg-config, + python3, + wrapGAppsHook4, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "key-rack"; + version = "0.4.0"; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "sophie-h"; + repo = "key-rack"; + rev = finalAttrs.version; + hash = "sha256-mthXtTlyrIChaKKwKosTsV1hK9OQ/zLScjrq6D3CRsg="; + }; + + patches = [ ./0001-fix-E0716.patch ]; + + postPatch = '' + patchShebangs --build build-aux/{checks.sh,read-manifest.py} + ''; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit (finalAttrs) pname version src; + hash = "sha256-wCJTm0W+g3+O1t1fR4maqJoxpPM0NeJG7d54MMAH33c="; + }; + + nativeBuildInputs = [ + cargo + rustc + meson + ninja + pkg-config + python3 + rustPlatform.cargoSetupHook + wrapGAppsHook4 + ]; + + buildInputs = [ libadwaita ]; + + # Workaround for the gettext-sys issue + # https://github.com/Koka/gettext-rs/issues/114 + env.NIX_CFLAGS_COMPILE = lib.optionalString ( + stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16" + ) "-Wno-error=incompatible-function-pointer-types"; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "View and edit your apps’ keys"; + homepage = "https://gitlab.gnome.org/sophie-h/key-rack"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ getchoo ]; + mainProgram = "key-rack"; + platforms = lib.platforms.linux; + }; +}) |