2018-02-18 13:21:11 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, unzip, catdoc }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-08-02 11:12:13 +02:00
|
|
|
pname = "catdocx";
|
|
|
|
version = "unstable-2017-01-02";
|
2018-02-18 13:21:11 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-02-18 13:21:11 +01:00
|
|
|
description = "Extracts plain text from docx files";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/jncraton/catdocx";
|
2018-02-18 13:21:11 +01:00
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = [ maintainers.michalrus ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|