mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 13:08:39 +03:00
commit
adca91bd67
@ -1,8 +1,39 @@
|
||||
{ config, stdenv, lib, fetchurl, pkg-config, zlib, expat, openssl, autoconf
|
||||
, libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec
|
||||
, libiconv, ijs, lcms2, callPackage, bash, buildPackages, openjpeg
|
||||
, cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups
|
||||
, x11Support ? cupsSupport, xorg # with CUPS, X11 only adds very little
|
||||
{ config
|
||||
, stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, zlib
|
||||
, expat
|
||||
, openssl
|
||||
, autoconf
|
||||
, libjpeg
|
||||
, libpng
|
||||
, libtiff
|
||||
, freetype
|
||||
, fontconfig
|
||||
, libpaper
|
||||
, jbig2dec
|
||||
, libiconv
|
||||
, ijs
|
||||
, lcms2
|
||||
, callPackage
|
||||
, bash
|
||||
, buildPackages
|
||||
, openjpeg
|
||||
, cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin)
|
||||
, cups
|
||||
, x11Support ? cupsSupport
|
||||
, xorg # with CUPS, X11 only adds very little
|
||||
, dynamicDrivers ? true
|
||||
|
||||
# for passthru.tests
|
||||
, graphicsmagick
|
||||
, imagemagick
|
||||
, libspectre
|
||||
, lilypond
|
||||
, pstoedit
|
||||
, python3
|
||||
}:
|
||||
|
||||
let
|
||||
@ -30,11 +61,11 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ghostscript${lib.optionalString (x11Support) "-with-X"}";
|
||||
version = "9.56.1";
|
||||
version = "10.01.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${lib.versions.minor version}${lib.versions.patch version}/ghostscript-${version}.tar.xz";
|
||||
sha512 = "22ysgdprh960rxmxyk2fy2my47cdrhfhbrwar1955hvad54iw79l916drp92wh3qzbxw6z40i70wk00vz8bn2ryig7qgpc1q01m2npy";
|
||||
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${lib.replaceStrings ["."] [""] version}/ghostscript-${version}.tar.xz";
|
||||
hash = "sha512-2US+norvaNEXbWTEDbb6htVdDJ4wBH8hR8AoBqthz+msLLANTlshj/PFHMbtR87/4brE3Z1MwXYLeXTzDGwnNQ==";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -77,11 +108,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = [
|
||||
"--with-system-libtiff"
|
||||
"--enable-dynamic"
|
||||
"--without-tesseract"
|
||||
]
|
||||
++ lib.optional x11Support "--with-x"
|
||||
++ lib.optionals cupsSupport [
|
||||
] ++ lib.optionals dynamicDrivers [
|
||||
"--enable-dynamic"
|
||||
"--disable-hidden-visibility"
|
||||
] ++ lib.optional x11Support [
|
||||
"--with-x"
|
||||
] ++ lib.optionals cupsSupport [
|
||||
"--enable-cups"
|
||||
];
|
||||
|
||||
@ -133,7 +166,11 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
passthru.tests.test-corpus-render = callPackage ./test-corpus-render.nix {};
|
||||
passthru.tests = {
|
||||
test-corpus-render = callPackage ./test-corpus-render.nix {};
|
||||
inherit graphicsmagick imagemagick libspectre lilypond pstoedit;
|
||||
inherit (python3.pkgs) matplotlib;
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.ghostscript.com/";
|
||||
|
@ -5,12 +5,12 @@
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "ghostscript-test-corpus-render";
|
||||
version = "unstable-2020-02-19";
|
||||
version = "unstable-2022-12-01";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.ghostscript.com/tests.git";
|
||||
rev = "efdd224340d9a407ed3ec22afa1cb127c8fee73c";
|
||||
sha256 = "1v1iqz897zzrwa8ng22zcf3y61ab5798jdwidgv10w1r9mjrl7ax";
|
||||
rev = "e81c3a1d7c679aab8230e9152165d8cffb687242";
|
||||
hash = "sha256-h+UHpCHASYOhf4xG6gkVJK9TEG85kE3jNx5cD1I3LQg=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
Loading…
Reference in New Issue
Block a user