linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / tools / text / catdocx / default.nix
blobadf78397fcb3d67c57318af14aa4a3a44fafcfef
1 { stdenv, lib, fetchFromGitHub, makeWrapper, unzip, catdoc }:
3 stdenv.mkDerivation {
4   name = "catdocx-20170102";
6   src = fetchFromGitHub {
7     owner = "jncraton";
8     repo = "catdocx";
9     rev = "04fa0416ec1f116d4996685e219f0856d99767cb";
10     sha256 = "1sxiqhkvdqn300ygfgxdry2dj2cqzjhkzw13c6349gg5vxfypcjh";
11   };
13   nativeBuildInputs = [ makeWrapper ];
15   installPhase = ''
16     mkdir -p $out/libexec $out/bin
17     cp catdocx.sh $out/libexec
18     chmod +x $out/libexec/catdocx.sh
19     wrapProgram $out/libexec/catdocx.sh --prefix PATH : "${lib.makeBinPath [ unzip catdoc ]}"
20     ln -s $out/libexec/catdocx.sh $out/bin/catdocx
21   '';
23   meta = with lib; {
24     description = "Extracts plain text from docx files";
25     homepage = "https://github.com/jncraton/catdocx";
26     license = with licenses; [ bsd3 ];
27     maintainers = [ maintainers.michalrus ];
28     platforms = platforms.all;
29   };