From 52942d8d48ebbc3d1bc5bb7a3bcceec34ae8dd6d Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sat, 5 Oct 2024 16:59:04 +0800 Subject: [PATCH] hashes: init at 1.1.0 --- pkgs/by-name/ha/hashes/package.nix | 73 ++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 pkgs/by-name/ha/hashes/package.nix diff --git a/pkgs/by-name/ha/hashes/package.nix b/pkgs/by-name/ha/hashes/package.nix new file mode 100644 index 000000000000..a1937d82f5b7 --- /dev/null +++ b/pkgs/by-name/ha/hashes/package.nix @@ -0,0 +1,73 @@ +{ + stdenv, + lib, + fetchFromGitHub, + nix-update-script, + adwaita-icon-theme, + gtk4, + libadwaita, + desktop-file-utils, + wrapGAppsHook4, + meson, + ninja, + pkg-config, + cmake, + python3Packages, + appstream, + fetchPypi, + gobject-introspection, + glib, +}: + +python3Packages.buildPythonApplication rec { + pname = "hashes"; + version = "1.1.0"; + + pyproject = false; + + src = fetchFromGitHub { + owner = "zefr0x"; + repo = "hashes"; + rev = "refs/tags/v${version}"; + hash = "sha256-BmfSCHs+JcpsAG8AhaYf+SDFI+LdJKMKgBIodd66qmw="; + }; + + nativeBuildInputs = [ + meson + ninja + desktop-file-utils + cmake + pkg-config + appstream + gobject-introspection + wrapGAppsHook4 + ]; + + buildInputs = [ + gtk4 + libadwaita + glib + adwaita-icon-theme + ]; + + dependencies = with python3Packages; [ + name-that-hash + pygobject3 + ]; + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + passthru.updateScript = nix-update-script { }; + + meta = { + homepage = "https://github.com/zefr0x/hashes/tree/main"; + changelog = "https://github.com/zefr0x/hashes/releases/tag/v${version}"; + description = "Simple hash algorithm identification GUI"; + maintainers = with lib.maintainers; [ bot-wxt1221 ]; + license = lib.licenses.gpl3Plus; + mainProgram = "hashes"; + platforms = lib.platforms.unix; + }; +}