diff --git a/pkgs/applications/graphics/imv/default.nix b/pkgs/applications/graphics/imv/default.nix index 38e536c70cbb..5f06feb7c622 100644 --- a/pkgs/applications/graphics/imv/default.nix +++ b/pkgs/applications/graphics/imv/default.nix @@ -1,27 +1,53 @@ -{ stdenv, fetchFromGitHub, SDL2, SDL2_ttf +{ stdenv, fetchFromGitHub , freeimage, fontconfig, pkgconfig , asciidoc, docbook_xsl, libxslt, cmocka -, librsvg +, librsvg, pango, libxkbcommon, wayland +, libGLU }: stdenv.mkDerivation rec { pname = "imv"; - version = "3.1.2"; + version = "4.0.1"; src = fetchFromGitHub { owner = "eXeC64"; repo = "imv"; rev = "v${version}"; - sha256 = "0gg362x2f7hli6cr6s7dmlanh4cqk7fd2pmk4zs9438jvqklf4cl"; + sha256 = "sha256:01fbkbwwsyr00k3mwans8jfb9p4gl02v6z62vgx0pkgrzxjkcz07"; }; + 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 + ]; + buildInputs = [ - SDL2 SDL2_ttf freeimage fontconfig pkgconfig - asciidoc docbook_xsl libxslt cmocka librsvg + freeimage + libGLU + librsvg + libxkbcommon + pango + pkgconfig + wayland ]; installFlags = [ "PREFIX=$(out)" "CONFIGPREFIX=$(out)/etc" ]; + 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; {