generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pdfjam.nix
50 lines (43 loc) · 1.04 KB
/
pdfjam.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ lib
, stdenv
, fetchFromGitHub
, zip
, texlive
}:
stdenv.mkDerivation rec {
pname = "pdfjam";
version = "3.07";
src = fetchFromGitHub {
owner = "rrthomas";
repo = "pdfjam";
rev = "v${version}";
hash = "sha256-nxFObYFLxzHZMhpc+hpSNod5gnHT9yHsIrftVaC0stA=";
};
buildInputs = [
zip # for tests.zip
];
propagatedBuildInputs = [
# pdflatex, pdfpages.sty, atbegshi.sty, ...
# see latex-dependency.txt
texlive.combined.scheme-small
];
buildPhase = ''
./build.sh
'';
installPhase = ''
cd built_package/pdfjam-${version}
mkdir -p $out
cp -r bin $out
sed -i '2i\export PATH=$PATH:${texlive.combined.scheme-small}/bin' $out/bin/*
mkdir -p $out/share/man
cp -r man1 $out/share/man
mkdir -p $out/opt/pdfjam
cp pdfjam.conf README.md $out/opt/pdfjam
'';
meta = with lib; {
description = "The pdfjam package for manipulating PDF files";
homepage = "https://github.com/rrthomas/pdfjam";
license = licenses.gpl2Only;
maintainers = with maintainers; [ ];
};
}