summary refs log tree commit diff
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorzendo <linzway@qq.com>2022-10-17 20:42:32 +0800
committerzendo <linzway@qq.com>2022-10-24 19:01:36 +0800
commit573a1fc1677fab51c6ffa845fff61aa5f9e9440e (patch)
tree024d2809b8dfde48ebe7fff345df1df9a8d0dc24 /pkgs/tools/text
parent946774a4d14af09fa8a5358dcb5f033cc311064b (diff)
downloadnixpkgs-573a1fc1677fab51c6ffa845fff61aa5f9e9440e.tar
nixpkgs-573a1fc1677fab51c6ffa845fff61aa5f9e9440e.tar.gz
nixpkgs-573a1fc1677fab51c6ffa845fff61aa5f9e9440e.tar.bz2
nixpkgs-573a1fc1677fab51c6ffa845fff61aa5f9e9440e.tar.lz
nixpkgs-573a1fc1677fab51c6ffa845fff61aa5f9e9440e.tar.xz
nixpkgs-573a1fc1677fab51c6ffa845fff61aa5f9e9440e.tar.zst
nixpkgs-573a1fc1677fab51c6ffa845fff61aa5f9e9440e.zip
textpieces: init at 3.3.0
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r--pkgs/tools/text/textpieces/default.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/pkgs/tools/text/textpieces/default.nix b/pkgs/tools/text/textpieces/default.nix
new file mode 100644
index 00000000000..db4edd417c2
--- /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 ];
+  };
+}