nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 nix-update-script,
5 adwaita-icon-theme,
6 gtk4,
7 libadwaita,
8 desktop-file-utils,
9 wrapGAppsHook4,
10 meson,
11 ninja,
12 pkg-config,
13 cmake,
14 python3Packages,
15 appstream,
16 gobject-introspection,
17 glib,
18}:
19
20python3Packages.buildPythonApplication rec {
21 pname = "hashes";
22 version = "1.1.2";
23
24 pyproject = false;
25
26 src = fetchFromGitHub {
27 owner = "zefr0x";
28 repo = "hashes";
29 tag = "v${version}";
30 hash = "sha256-Nyf7jED6LnsFu86zWhRh05sdGKwVAybVsGLGFFsz6eA=";
31 };
32
33 nativeBuildInputs = [
34 meson
35 ninja
36 desktop-file-utils
37 cmake
38 pkg-config
39 appstream
40 gobject-introspection
41 wrapGAppsHook4
42 ];
43
44 buildInputs = [
45 gtk4
46 libadwaita
47 glib
48 adwaita-icon-theme
49 ];
50
51 dependencies = with python3Packages; [
52 name-that-hash
53 pygobject3
54 ];
55 dontWrapGApps = true;
56
57 preFixup = ''
58 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
59 '';
60 passthru.updateScript = nix-update-script { };
61
62 meta = {
63 homepage = "https://github.com/zefr0x/hashes/tree/main";
64 changelog = "https://github.com/zefr0x/hashes/releases/tag/v${version}";
65 description = "Simple hash algorithm identification GUI";
66 maintainers = with lib.maintainers; [ bot-wxt1221 ];
67 license = lib.licenses.gpl3Plus;
68 mainProgram = "hashes";
69 platforms = lib.platforms.unix;
70 };
71}