btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / ke / key-rack / package.nix
blobdcb5ac1c82ff9bf493c0eecab37b015052365ee9
2   lib,
3   fetchFromGitLab,
4   stdenv,
5   rustPlatform,
6   cargo,
7   rustc,
8   libadwaita,
9   meson,
10   ninja,
11   nix-update-script,
12   pkg-config,
13   python3,
14   wrapGAppsHook4,
16 stdenv.mkDerivation (finalAttrs: {
17   pname = "key-rack";
18   version = "0.4.0";
20   src = fetchFromGitLab {
21     domain = "gitlab.gnome.org";
22     owner = "sophie-h";
23     repo = "key-rack";
24     rev = finalAttrs.version;
25     hash = "sha256-mthXtTlyrIChaKKwKosTsV1hK9OQ/zLScjrq6D3CRsg=";
26   };
28   patches = [ ./0001-fix-E0716.patch ];
30   postPatch = ''
31     patchShebangs --build build-aux/{checks.sh,read-manifest.py}
32   '';
34   cargoDeps = rustPlatform.fetchCargoTarball {
35     inherit (finalAttrs) src;
36     hash = "sha256-wCJTm0W+g3+O1t1fR4maqJoxpPM0NeJG7d54MMAH33c=";
37   };
39   nativeBuildInputs = [
40     cargo
41     rustc
42     meson
43     ninja
44     pkg-config
45     python3
46     rustPlatform.cargoSetupHook
47     wrapGAppsHook4
48   ];
50   buildInputs = [ libadwaita ];
52   # Workaround for the gettext-sys issue
53   # https://github.com/Koka/gettext-rs/issues/114
54   env.NIX_CFLAGS_COMPILE = lib.optionalString (
55     stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16"
56   ) "-Wno-error=incompatible-function-pointer-types";
58   passthru = {
59     updateScript = nix-update-script { };
60   };
62   meta = {
63     description = "View and edit your apps’ keys";
64     homepage = "https://gitlab.gnome.org/sophie-h/key-rack";
65     license = lib.licenses.gpl3Plus;
66     maintainers = with lib.maintainers; [ getchoo ];
67     mainProgram = "key-rack";
68     platforms = lib.platforms.linux;
69   };