2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, SDL, SDL_image, libjpeg, libpng, libtiff }:
|
2016-06-29 18:38:10 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "zgv";
|
2016-06-29 18:38:10 +01:00
|
|
|
version = "5.9";
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://www.svgalib.org/rus/zgv/${pname}-${version}.tar.gz";
|
2016-06-29 18:38:10 +01:00
|
|
|
sha256 = "1fk4i9x0cpnpn3llam0zy2pkmhlr2hy3iaxhxg07v9sizd4dircj";
|
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 22:26:13 +01:00
|
|
|
buildInputs = [ SDL SDL_image libjpeg libpng libtiff ];
|
2016-06-29 18:38:10 +01:00
|
|
|
|
2016-08-02 16:30:36 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2016-06-29 18:38:10 +01:00
|
|
|
makeFlags = [
|
|
|
|
"BACKEND=SDL"
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://foss.aueb.gr/mirrors/linux/gentoo/media-gfx/zgv/files/zgv-5.9-libpng15.patch";
|
2016-06-29 18:38:10 +01:00
|
|
|
sha256 = "1blw9n04c28bnwcmcn64si4f5zpg42s8yn345js88fyzi9zm19xw";
|
|
|
|
})
|
|
|
|
./switch.patch
|
|
|
|
];
|
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
patchFlags = [ "-p0" ];
|
2016-06-29 18:38:10 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp src/zgv $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.svgalib.org/rus/zgv/";
|
2016-06-29 18:38:10 +01:00
|
|
|
description = "Picture viewer with a thumbnail-based selector";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.vrthra ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|