diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2019-02-17 07:58:47 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2019-02-17 08:05:24 +0100 |
commit | f7f1a2f54ef2b744a26e37418dd6354bc46aa20a (patch) | |
tree | 03b40b737111f3677fbf508dce58a29cfc81fc1b /pkgs/applications/graphics | |
parent | 705167a5dceb53befd22f4e6184bbfba0813b73d (diff) | |
parent | c904c2ec09cbee8b46bee136e062e611d249cdf2 (diff) | |
download | nixlib-f7f1a2f54ef2b744a26e37418dd6354bc46aa20a.tar nixlib-f7f1a2f54ef2b744a26e37418dd6354bc46aa20a.tar.gz nixlib-f7f1a2f54ef2b744a26e37418dd6354bc46aa20a.tar.bz2 nixlib-f7f1a2f54ef2b744a26e37418dd6354bc46aa20a.tar.lz nixlib-f7f1a2f54ef2b744a26e37418dd6354bc46aa20a.tar.xz nixlib-f7f1a2f54ef2b744a26e37418dd6354bc46aa20a.tar.zst nixlib-f7f1a2f54ef2b744a26e37418dd6354bc46aa20a.zip |
Merge branch 'master' into staging-next
A mass darwin rebuild from master (#55784).
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r-- | pkgs/applications/graphics/digikam/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/graphics/feh/default.nix | 17 | ||||
-rw-r--r-- | pkgs/applications/graphics/gscan2pdf/default.nix | 103 |
3 files changed, 112 insertions, 12 deletions
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix index e7621414b06f..7fcdb46e32e9 100644 --- a/pkgs/applications/graphics/digikam/default.nix +++ b/pkgs/applications/graphics/digikam/default.nix @@ -50,13 +50,13 @@ mkDerivation rec { name = "digikam-${version}"; - version = "5.9.0"; + version = "6.0.0"; src = fetchFromGitHub { owner = "KDE"; repo = "digikam"; rev = "v${version}"; - sha256 = "09diw273h9i7rss89ba82yrfy6jb2njv3k0dknrrg7bb998vrw2d"; + sha256 = "1ifvrn0bm7fp07d059rl4dy146qzdxafl36ipxg1fg00dkv95hh4"; }; nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ]; diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix index 02e6a10295e9..9ef70dff7663 100644 --- a/pkgs/applications/graphics/feh/default.nix +++ b/pkgs/applications/graphics/feh/default.nix @@ -6,11 +6,11 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "feh-${version}"; - version = "3.1.1"; + version = "3.1.2"; src = fetchurl { url = "https://feh.finalrewind.org/${name}.tar.bz2"; - sha256 = "1sy8z6rv5sy1bhk3846hgfdy96wdi874yr2fnxfprks46qp29l31"; + sha256 = "0qjhlrgr606gc9h96w9piyd13mx63jqfbxxnan41nrh76m8d0dka"; }; outputs = [ "out" "man" "doc" ]; @@ -20,25 +20,22 @@ stdenv.mkDerivation rec { buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ]; makeFlags = [ - "PREFIX=$(out)" "exif=1" + "PREFIX=${placeholder "out"}" "exif=1" ] ++ optional stdenv.isDarwin "verscmp=0"; - postBuild = '' - pushd man - make - popd - ''; - + installTargets = [ "install" ]; postInstall = '' wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \ --add-flags '--theme=feh' - install -D -m 644 man/*.1 $out/share/man/man1 ''; checkInputs = [ perlPackages.perl perlPackages.TestCommand ]; preCheck = '' export PERL5LIB="${perlPackages.TestCommand}/${perlPackages.perl.libPrefix}" ''; + postCheck = '' + unset PERL5LIB + ''; doCheck = true; diff --git a/pkgs/applications/graphics/gscan2pdf/default.nix b/pkgs/applications/graphics/gscan2pdf/default.nix new file mode 100644 index 000000000000..9ec82ea2a94b --- /dev/null +++ b/pkgs/applications/graphics/gscan2pdf/default.nix @@ -0,0 +1,103 @@ +{ stdenv, fetchurl, perlPackages, makeWrapper, wrapGAppsHook, + librsvg, sane-backends, sane-frontends, + imagemagick, libtiff, djvulibre, poppler_utils, ghostscript, unpaper, + xvfb_run, hicolor-icon-theme, liberation_ttf, file, pdftk }: + +with stdenv.lib; + +perlPackages.buildPerlPackage rec { + name = "gscan2pdf-${version}"; + version = "2.3.0"; + + src = fetchurl { + url = "mirror://sourceforge/gscan2pdf/${version}/${name}.tar.xz"; + sha256 = "0mcsmly0j9pmyzh6py8r6sfa30hc6gv300hqq3dxj4hv653vhkk9"; + }; + + nativeBuildInputs = [ wrapGAppsHook ]; + + buildInputs = + [ librsvg sane-backends sane-frontends ] ++ + (with perlPackages; [ + Gtk3 + Gtk3SimpleList + Cairo + CairoGObject + Glib + GlibObjectIntrospection + GooCanvas2 + LocaleGettext + PDFAPI2 + ImageSane + SetIntSpan + PerlMagick + ConfigGeneral + ListMoreUtils + HTMLParser + ProcProcessTable + Log4Perl + TryTiny + DataUUID + DateCalc + IOString + FilesysDf + SubOverride + ]); + + postPatch = let + fontSubstitute = "${liberation_ttf}/share/fonts/truetype/LiberationSans-Regular.ttf"; + in '' + # Required for the program to properly load its SVG assets + substituteInPlace bin/gscan2pdf \ + --replace "/usr/share" "$out/share" + + # Substitute the non-free Helvetica font in the tests + sed -i 's|-pointsize|-font ${fontSubstitute} -pointsize|g' t/*.t + ''; + + postInstall = '' + # Remove impurity + find $out -type f -name "*.pod" -delete + + # Add runtime dependencies + wrapProgram "$out/bin/gscan2pdf" \ + --prefix PATH : "${imagemagick}/bin" \ + --prefix PATH : "${libtiff}/bin" \ + --prefix PATH : "${djvulibre}/bin" \ + --prefix PATH : "${poppler_utils}/bin" \ + --prefix PATH : "${ghostscript}/bin" \ + --prefix PATH : "${unpaper}/bin" + ''; + + enableParallelBuilding = true; + + installTargets = [ "install" ]; + + outputs = [ "out" "man" ]; + + checkInputs = [ + xvfb_run + hicolor-icon-theme + imagemagick + libtiff + djvulibre + poppler_utils + ghostscript + file + pdftk + unpaper + ]; + + checkPhase = '' + xvfb-run -s '-screen 0 800x600x24' \ + make test + ''; + + meta = { + description = "A GUI to produce PDFs or DjVus from scanned documents"; + homepage = http://gscan2pdf.sourceforge.net/; + license = licenses.gpl3; + maintainers = [ maintainers.pacien ]; + }; +} + |