567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
48 lines
949 B
Nix
48 lines
949 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
ocaml,
|
|
findlib,
|
|
camlpdf,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ocaml${ocaml.version}-cpdf";
|
|
version = "2.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "johnwhitington";
|
|
repo = "cpdf-source";
|
|
rev = "v${version}";
|
|
hash = "sha256-DvTY5EQcvnL76RlQTcVqBiycqbCdGQCXzarSMH2P/pg=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
ocaml
|
|
findlib
|
|
];
|
|
propagatedBuildInputs = [ camlpdf ];
|
|
|
|
strictDeps = true;
|
|
|
|
preInstall = ''
|
|
mkdir -p $OCAMLFIND_DESTDIR
|
|
mkdir -p $out/bin
|
|
cp cpdf $out/bin
|
|
mkdir -p $out/share/
|
|
cp -r doc $out/share
|
|
cp cpdfmanual.pdf $out/share/doc/cpdf/
|
|
'';
|
|
|
|
meta = {
|
|
description = "PDF Command Line Tools";
|
|
homepage = "https://www.coherentpdf.com/";
|
|
license = lib.licenses.agpl3Only;
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
mainProgram = "cpdf";
|
|
inherit (ocaml.meta) platforms;
|
|
broken = lib.versionOlder ocaml.version "4.10";
|
|
};
|
|
}
|