2020-10-19 23:25:03 +00:00
|
|
|
{ asciidoc
|
|
|
|
, cmocka
|
|
|
|
, docbook_xsl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fontconfig
|
|
|
|
, freeimage
|
|
|
|
, icu
|
|
|
|
, libGLU
|
|
|
|
, libheif
|
|
|
|
, libjpeg_turbo
|
|
|
|
, libpng
|
|
|
|
, librsvg
|
|
|
|
, libtiff
|
|
|
|
, libxkbcommon
|
|
|
|
, libxslt
|
|
|
|
, netsurf
|
|
|
|
, pango
|
|
|
|
, pkgconfig
|
|
|
|
, stdenv
|
|
|
|
, wayland
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "imv";
|
|
|
|
version = "4.1.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-10-19 23:25:03 +00:00
|
|
|
owner = "eXeC64";
|
|
|
|
repo = "imv";
|
|
|
|
rev = "v${version}";
|
2020-06-02 18:00:15 +00:00
|
|
|
sha256 = "0gk8g178i961nn3bls75a8qpv6wvfvav6hd9lxca1skaikd33zdx";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-19 23:25:03 +00:00
|
|
|
nativeBuildInputs = [ asciidoc cmocka docbook_xsl libxslt ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
freeimage
|
2020-10-19 23:25:03 +00:00
|
|
|
icu
|
2020-04-24 23:36:52 +00:00
|
|
|
libGLU
|
2020-10-19 23:25:03 +00:00
|
|
|
libjpeg_turbo
|
2020-04-24 23:36:52 +00:00
|
|
|
librsvg
|
|
|
|
libxkbcommon
|
2020-10-19 23:25:03 +00:00
|
|
|
netsurf.libnsgif
|
2020-04-24 23:36:52 +00:00
|
|
|
pango
|
|
|
|
pkgconfig
|
|
|
|
wayland
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)" "CONFIGPREFIX=$(out)/etc" ];
|
|
|
|
|
2020-10-19 23:25:03 +00:00
|
|
|
makeFlags = [ "BACKEND_LIBJPEG=yes" "BACKEND_LIBNSGIF=yes" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
|
|
|
# The `bin/imv` script assumes imv-wayland or imv-x11 in PATH,
|
|
|
|
# so we have to fix those to the binaries we installed into the /nix/store
|
|
|
|
|
|
|
|
sed -i "s|\bimv-wayland\b|$out/bin/imv-wayland|" $out/bin/imv
|
|
|
|
sed -i "s|\bimv-x11\b|$out/bin/imv-x11|" $out/bin/imv
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A command line image viewer for tiling window managers";
|
2020-10-19 23:25:03 +00:00
|
|
|
homepage = "https://github.com/eXeC64/imv";
|
|
|
|
license = licenses.gpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ rnhmjoj markus1189 ];
|
2020-10-19 23:25:03 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|