From 573a1fc1677fab51c6ffa845fff61aa5f9e9440e Mon Sep 17 00:00:00 2001 From: zendo Date: Mon, 17 Oct 2022 20:42:32 +0800 Subject: [PATCH] textpieces: init at 3.3.0 --- pkgs/tools/text/textpieces/default.nix | 76 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 78 insertions(+) create mode 100644 pkgs/tools/text/textpieces/default.nix diff --git a/pkgs/tools/text/textpieces/default.nix b/pkgs/tools/text/textpieces/default.nix new file mode 100644 index 000000000000..db4edd417c20 --- /dev/null +++ b/pkgs/tools/text/textpieces/default.nix @@ -0,0 +1,76 @@ +{ lib +, stdenv +, fetchFromGitHub +, python3 +, meson +, ninja +, pkg-config +, vala +, glib +, gtk4 +, libgee +, libadwaita +, json-glib +, blueprint-compiler +, gtksourceview5 +, gobject-introspection +, wrapGAppsHook4 +, appstream-glib +, desktop-file-utils +}: + +let + pythonEnv = python3.withPackages ( ps: with ps; [ pyyaml ] ); +in +stdenv.mkDerivation rec { + pname = "textpieces"; + version = "3.3.0"; + + src = fetchFromGitHub { + owner = "liferooter"; + repo = pname; + rev = "v${version}"; + hash = "sha256-QLPvK2kiOGf8XN2aors6cZtl9d9uqsxcho2A1kISO5Y="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + pythonEnv + vala + blueprint-compiler + wrapGAppsHook4 + appstream-glib + desktop-file-utils + ]; + + buildInputs = [ + glib + gtk4 + libadwaita + libgee + json-glib + gtksourceview5 + gobject-introspection + ]; + + runtimeDependencies = [ + pythonEnv + ]; + + postPatch = '' + chmod +x build-aux/meson/postinstall.py + patchShebangs build-aux/meson/postinstall.py + patchShebangs scripts/ + ''; + + meta = with lib; { + description = "Quick text processing"; + longDescription = "A small tool for quick text transformations such as checksums, encoding, decoding and so on."; + homepage = "https://github.com/liferooter/textpieces"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ zendo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac51b9fcc46b..73473d04719a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31911,6 +31911,8 @@ with pkgs; terminal-notifier = callPackage ../applications/misc/terminal-notifier {}; + textpieces = callPackage ../tools/text/textpieces { }; + textplots = callPackage ../tools/graphics/textplots { }; texture-synthesis = callPackage ../tools/graphics/texture-synthesis { };