summary refs log tree commit diff
path: root/pkgs/tools/text/catdocx
diff options
context:
space:
mode:
authorMichal Rus <m@michalrus.com>2018-02-18 13:21:11 +0100
committerMichal Rus <m@michalrus.com>2018-02-18 13:44:31 +0100
commit0552147a3456662908646c9896c5149788a0982c (patch)
tree571824ed9283ffe01c749a8545887c0578794261 /pkgs/tools/text/catdocx
parent327a84749ed48a20736fdf20b9dd4f5723b01912 (diff)
downloadnixpkgs-0552147a3456662908646c9896c5149788a0982c.tar
nixpkgs-0552147a3456662908646c9896c5149788a0982c.tar.gz
nixpkgs-0552147a3456662908646c9896c5149788a0982c.tar.bz2
nixpkgs-0552147a3456662908646c9896c5149788a0982c.tar.lz
nixpkgs-0552147a3456662908646c9896c5149788a0982c.tar.xz
nixpkgs-0552147a3456662908646c9896c5149788a0982c.tar.zst
nixpkgs-0552147a3456662908646c9896c5149788a0982c.zip
catdocx: init at 20170102
Diffstat (limited to 'pkgs/tools/text/catdocx')
-rw-r--r--pkgs/tools/text/catdocx/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/tools/text/catdocx/default.nix b/pkgs/tools/text/catdocx/default.nix
new file mode 100644
index 00000000000..adf9d17815b
--- /dev/null
+++ b/pkgs/tools/text/catdocx/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, unzip, catdoc }:
+
+stdenv.mkDerivation {
+  name = "catdocx-20170102";
+
+  src = fetchFromGitHub {
+    owner = "jncraton";
+    repo = "catdocx";
+    rev = "04fa0416ec1f116d4996685e219f0856d99767cb";
+    sha256 = "1sxiqhkvdqn300ygfgxdry2dj2cqzjhkzw13c6349gg5vxfypcjh";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/libexec $out/bin
+    cp catdocx.sh $out/libexec
+    chmod +x $out/libexec/catdocx.sh
+    wrapProgram $out/libexec/catdocx.sh --prefix PATH : "${lib.makeBinPath [ unzip catdoc ]}"
+    ln -s $out/libexec/catdocx.sh $out/bin/catdocx
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Extracts plain text from docx files";
+    homepage = https://github.com/jncraton/catdocx;
+    license = with licenses; [ bsd3 ];
+    maintainers = [ maintainers.michalrus ];
+    platforms = platforms.all;
+  };
+}