pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / by-name / hi / hieroglyphic / package.nix
blob71f245d996f43f875975713b834805e07059945a
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   darwin,
17   gettext,
18   appstream,
21 let
22   inherit (darwin.apple_sdk.frameworks) CoreFoundation Foundation;
24 stdenv.mkDerivation (finalAttrs: {
25   pname = "hieroglyphic";
26   version = "1.1.0";
28   src = fetchFromGitHub {
29     owner = "FineFindus";
30     repo = "Hieroglyphic";
31     rev = "refs/tags/v${finalAttrs.version}";
32     hash = "sha256-8UUFatJwtxqumhHd0aiPk6nKsaaF/jIIqMFxXye0X8U=";
33   };
35   # We have to use importCargoLock here because `cargo vendor` currently doesn't support workspace
36   # inheritance within Git dependencies, but importCargoLock does.
37   cargoDeps = rustPlatform.importCargoLock {
38     lockFile = ./Cargo.lock;
39     outputHashes = {
40       "detexify-0.4.0" = "sha256-BPOHNr3pwu2il3/ERko+WHAWby4rPR49i62tXDlDRu0=";
41     };
42   };
44   nativeBuildInputs = [
45     rustPlatform.cargoSetupHook
46     cargo
47     rustc
48     meson
49     ninja
50     pkg-config
51     wrapGAppsHook4
52     desktop-file-utils
53     appstream
54   ];
56   buildInputs =
57     [
58       glib
59       gtk4
60       libadwaita
61     ]
62     ++ lib.optionals stdenv.hostPlatform.isDarwin [
63       CoreFoundation
64       Foundation
65     ];
67   # needed for darwin
68   env.GETTEXT_DIR = "${gettext}";
70   meta = {
71     changelog = "https://github.com/FineFindus/Hieroglyphic/releases/tag/v${finalAttrs.version}";
72     description = "Tool based on detexify for finding LaTeX symbols from drawings";
73     homepage = "https://apps.gnome.org/en/Hieroglyphic/";
74     license = lib.licenses.gpl3Only;
75     mainProgram = "hieroglyphic";
76     maintainers = with lib.maintainers; [ tomasajt ];
77     platforms = lib.platforms.linux ++ lib.platforms.darwin;
78   };