btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / hi / hieroglyphic / package.nix
blob9802e66967f119f4e42ffacd578a69c0de67d44e
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   rustPlatform,
6   cargo,
7   rustc,
8   meson,
9   ninja,
10   pkg-config,
11   wrapGAppsHook4,
12   desktop-file-utils,
13   glib,
14   gtk4,
15   libadwaita,
16   gettext,
17   appstream,
20 stdenv.mkDerivation (finalAttrs: {
21   pname = "hieroglyphic";
22   version = "1.1.0";
24   src = fetchFromGitHub {
25     owner = "FineFindus";
26     repo = "Hieroglyphic";
27     rev = "refs/tags/v${finalAttrs.version}";
28     hash = "sha256-8UUFatJwtxqumhHd0aiPk6nKsaaF/jIIqMFxXye0X8U=";
29   };
31   # We have to use importCargoLock here because `cargo vendor` currently doesn't support workspace
32   # inheritance within Git dependencies, but importCargoLock does.
33   cargoDeps = rustPlatform.importCargoLock {
34     lockFile = ./Cargo.lock;
35     outputHashes = {
36       "detexify-0.4.0" = "sha256-BPOHNr3pwu2il3/ERko+WHAWby4rPR49i62tXDlDRu0=";
37     };
38   };
40   nativeBuildInputs = [
41     rustPlatform.cargoSetupHook
42     cargo
43     rustc
44     meson
45     ninja
46     pkg-config
47     wrapGAppsHook4
48     desktop-file-utils
49     appstream
50   ];
52   buildInputs = [
53     glib
54     gtk4
55     libadwaita
56   ];
58   # needed for darwin
59   env.GETTEXT_DIR = "${gettext}";
61   meta = {
62     changelog = "https://github.com/FineFindus/Hieroglyphic/releases/tag/v${finalAttrs.version}";
63     description = "Tool based on detexify for finding LaTeX symbols from drawings";
64     homepage = "https://apps.gnome.org/en/Hieroglyphic/";
65     license = lib.licenses.gpl3Only;
66     mainProgram = "hieroglyphic";
67     maintainers = with lib.maintainers; [ tomasajt ];
68     platforms = lib.platforms.linux ++ lib.platforms.darwin;
69   };