From 723e693791d230ade50a2c9acca4c7751825bf8a Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sat, 19 Dec 2015 09:42:01 +0100 Subject: [PATCH] djvu2pdf: make work in nix-shell --- pkgs/tools/typesetting/djvu2pdf/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/typesetting/djvu2pdf/default.nix b/pkgs/tools/typesetting/djvu2pdf/default.nix index 5455df5f106e..512efe497fa0 100644 --- a/pkgs/tools/typesetting/djvu2pdf/default.nix +++ b/pkgs/tools/typesetting/djvu2pdf/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, pkgconfig, djvulibre, ghostscript }: +{ stdenv, makeWrapper, fetchurl, djvulibre, ghostscript, which }: stdenv.mkDerivation rec { version = "0.9.2"; @@ -9,12 +9,13 @@ stdenv.mkDerivation rec { sha256 = "0v2ax30m7j1yi4m02nzn9rc4sn4vzqh5vywdh96r64j4pwvn5s5g"; }; - buildInputs = [ pkgconfig ]; - propagatedUserEnvPkgs = [ djvulibre ghostscript ]; + nativeBuildInputs = [ makeWrapper ]; installPhase = '' mkdir -p $out/bin cp -p djvu2pdf $out/bin + wrapProgram $out/bin/djvu2pdf --prefix PATH : ${ghostscript}/bin:${djvulibre}/bin:${which}/bin + mkdir -p $out/man/man1 cp -p djvu2pdf.1.gz $out/man/man1 ''; @@ -23,6 +24,7 @@ stdenv.mkDerivation rec { description = "Creates djvu files from PDF files"; homepage = http://0x2a.at/s/projects/djvu2pdf; license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.all; inherit version; }; }