1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00
nixpkgs/pkgs/applications/graphics/zgv/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

43 lines
1 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, pkgconfig, SDL, SDL_image, libjpeg, libpng, libtiff }:
stdenv.mkDerivation rec {
pname = "zgv";
version = "5.9";
src = fetchurl {
url = "https://www.svgalib.org/rus/zgv/${pname}-${version}.tar.gz";
sha256 = "1fk4i9x0cpnpn3llam0zy2pkmhlr2hy3iaxhxg07v9sizd4dircj";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ SDL SDL_image libjpeg libpng libtiff ];
hardeningDisable = [ "format" ];
makeFlags = [
"BACKEND=SDL"
];
patches = [
(fetchpatch {
url = "https://foss.aueb.gr/mirrors/linux/gentoo/media-gfx/zgv/files/zgv-5.9-libpng15.patch";
sha256 = "1blw9n04c28bnwcmcn64si4f5zpg42s8yn345js88fyzi9zm19xw";
})
./switch.patch
];
patchFlags = [ "-p0" ];
installPhase = ''
mkdir -p $out/bin
cp src/zgv $out/bin
'';
meta = with lib; {
homepage = "http://www.svgalib.org/rus/zgv/";
description = "Picture viewer with a thumbnail-based selector";
license = licenses.gpl2;
maintainers = [ maintainers.vrthra ];
platforms = platforms.linux;
};
}