mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 02:55:39 +00:00
pdf2odt: 20170207 -> 20220827
This commit is contained in:
parent
437ced8331
commit
5f4ee9b5fe
61
pkgs/by-name/pd/pdf2odt/package.nix
Normal file
61
pkgs/by-name/pd/pdf2odt/package.nix
Normal file
@ -0,0 +1,61 @@
|
||||
{ lib
|
||||
, resholve
|
||||
, fetchFromGitHub
|
||||
, bc
|
||||
, coreutils
|
||||
, file
|
||||
, gawk
|
||||
, ghostscript
|
||||
, gnused
|
||||
, imagemagick
|
||||
, zip
|
||||
, runtimeShell
|
||||
, findutils
|
||||
}:
|
||||
|
||||
resholve.mkDerivation rec {
|
||||
pname = "pdf2odt";
|
||||
version = "20220827";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gutschke";
|
||||
repo = "pdf2odt";
|
||||
rev = "a05fbdebcc39277d905d1ae66f585a19f467b406";
|
||||
hash = "sha256-995iF5Z1V4QEXeXUB8irG451TXpQBHZThJcEfHwfRtE=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm0555 pdf2odt -t $out/bin
|
||||
install -Dm0444 README.md LICENSE -t $out/share/doc/${pname}
|
||||
|
||||
ln -rs $out/bin/pdf2odt $out/bin/pdf2ods
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
solutions.default = {
|
||||
scripts = [ "bin/pdf2odt" ];
|
||||
interpreter = runtimeShell;
|
||||
inputs = [
|
||||
bc
|
||||
coreutils
|
||||
file
|
||||
findutils
|
||||
gawk
|
||||
ghostscript
|
||||
gnused
|
||||
imagemagick
|
||||
zip
|
||||
];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "PDF to ODT/ODS format converter";
|
||||
homepage = "https://github.com/gutschke/pdf2odt";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
{ lib
|
||||
, resholve
|
||||
, fetchFromGitHub
|
||||
, bc
|
||||
, coreutils
|
||||
, file
|
||||
, gawk
|
||||
, ghostscript
|
||||
, gnused
|
||||
, imagemagick
|
||||
, zip
|
||||
, bash
|
||||
, findutils
|
||||
}:
|
||||
|
||||
resholve.mkDerivation rec {
|
||||
pname = "pdf2odt";
|
||||
version = "20170207";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gutschke";
|
||||
repo = "pdf2odt";
|
||||
rev = "4533bd14306c30c085001db59dbb8114ea09c360";
|
||||
sha256 = "14f9r5f0g6jzanl54jv86ls0frvspka1p9c8dy3fnriqpm584j0r";
|
||||
};
|
||||
|
||||
patches = [ ./use_mktemp.patch ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0755 pdf2odt -t $out/bin
|
||||
install -Dm0644 README.md LICENSE -t $out/share/doc/pdf2odt
|
||||
|
||||
ln -rs $out/bin/pdf2odt $out/bin/pdf2ods
|
||||
'';
|
||||
solutions = {
|
||||
default = {
|
||||
scripts = [ "bin/pdf2odt" ];
|
||||
interpreter = "${bash}/bin/bash";
|
||||
inputs = [
|
||||
coreutils
|
||||
bc
|
||||
file
|
||||
imagemagick
|
||||
gawk
|
||||
gnused
|
||||
ghostscript
|
||||
zip
|
||||
findutils
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "PDF to ODT format converter";
|
||||
homepage = "https://github.com/gutschke/pdf2odt";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
diff --git a/pdf2odt b/pdf2odt
|
||||
index d38bb07..e1ddf05 100755
|
||||
--- a/pdf2odt
|
||||
+++ b/pdf2odt
|
||||
@@ -173,13 +173,7 @@ if [ -e "${out}" ] &&
|
||||
fi
|
||||
|
||||
# Set up temporary staging directory
|
||||
-TMPDIR="/tmp/pdf2odt.$$"
|
||||
-[ \! -e "${TMPDIR}" ] || {
|
||||
- echo "Staging directory ${TMPDIR} already exists" >&2
|
||||
- exit 1
|
||||
-}
|
||||
-trap 'rm -rf "${TMPDIR}"' EXIT INT TERM QUIT HUP
|
||||
-mkdir -p "${TMPDIR}"
|
||||
+TMPDIR=$(mktemp -d)
|
||||
|
||||
# Adjust DPI so that the image fits on a letter- or a4-sized page.
|
||||
function scale() {
|
@ -11974,8 +11974,6 @@ with pkgs;
|
||||
|
||||
pdf2djvu = callPackage ../tools/typesetting/pdf2djvu { };
|
||||
|
||||
pdf2odt = callPackage ../tools/typesetting/pdf2odt { };
|
||||
|
||||
pdfcrack = callPackage ../tools/security/pdfcrack { };
|
||||
|
||||
pdfposter = callPackage ../applications/misc/pdfposter { };
|
||||
|
Loading…
Reference in New Issue
Block a user