2019-09-06 08:01:47 +00:00
|
|
|
{ stdenv, fetchFromGitHub
|
2018-09-03 12:22:32 +00:00
|
|
|
, freeimage, fontconfig, pkgconfig
|
|
|
|
, asciidoc, docbook_xsl, libxslt, cmocka
|
2019-09-06 08:01:47 +00:00
|
|
|
, librsvg, pango, libxkbcommon, wayland
|
2020-01-09 20:00:18 +00:00
|
|
|
, libGLU, icu
|
2018-09-03 12:22:32 +00:00
|
|
|
}:
|
2015-11-12 18:40:00 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "imv";
|
2020-01-09 20:00:18 +00:00
|
|
|
version = "4.1.0";
|
2015-11-12 18:40:00 +00:00
|
|
|
|
2018-09-03 12:22:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eXeC64";
|
|
|
|
repo = "imv";
|
|
|
|
rev = "v${version}";
|
2020-01-09 20:00:18 +00:00
|
|
|
sha256 = "sha256:0gk8g178i961nn3bls75a8qpv6wvfvav6hd9lxca1skaikd33zdx";
|
2015-11-12 18:40:00 +00:00
|
|
|
};
|
|
|
|
|
2019-09-06 08:01:47 +00:00
|
|
|
preBuild = ''
|
|
|
|
# Version is 4.0.1, but Makefile was not updated
|
|
|
|
sed -i 's/echo v4\.0\.0/echo v4.0.1/' Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
asciidoc
|
|
|
|
cmocka
|
|
|
|
docbook_xsl
|
|
|
|
libxslt
|
|
|
|
];
|
|
|
|
|
2018-09-03 12:22:32 +00:00
|
|
|
buildInputs = [
|
2019-09-06 08:01:47 +00:00
|
|
|
freeimage
|
|
|
|
libGLU
|
|
|
|
librsvg
|
|
|
|
libxkbcommon
|
|
|
|
pango
|
|
|
|
pkgconfig
|
|
|
|
wayland
|
2020-01-09 20:00:18 +00:00
|
|
|
icu
|
2018-09-03 12:22:32 +00:00
|
|
|
];
|
2015-11-12 18:40:00 +00:00
|
|
|
|
2018-09-03 12:22:32 +00:00
|
|
|
installFlags = [ "PREFIX=$(out)" "CONFIGPREFIX=$(out)/etc" ];
|
2015-11-12 18:40:00 +00:00
|
|
|
|
2019-09-06 08:01:47 +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
|
|
|
|
'';
|
|
|
|
|
2019-07-19 06:40:54 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2015-11-12 18:40:00 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A command line image viewer for tiling window managers";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/eXeC64/imv";
|
2015-12-08 15:22:16 +00:00
|
|
|
license = licenses.gpl2;
|
2019-07-19 06:40:54 +00:00
|
|
|
maintainers = with maintainers; [ rnhmjoj markus1189 ];
|
2018-09-09 08:30:58 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2015-11-12 18:40:00 +00:00
|
|
|
};
|
|
|
|
}
|