diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/graphics/imv')
-rw-r--r-- | nixpkgs/pkgs/applications/graphics/imv/default.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/graphics/imv/default.nix b/nixpkgs/pkgs/applications/graphics/imv/default.nix new file mode 100644 index 000000000000..5f06feb7c622 --- /dev/null +++ b/nixpkgs/pkgs/applications/graphics/imv/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchFromGitHub +, freeimage, fontconfig, pkgconfig +, asciidoc, docbook_xsl, libxslt, cmocka +, librsvg, pango, libxkbcommon, wayland +, libGLU +}: + +stdenv.mkDerivation rec { + pname = "imv"; + version = "4.0.1"; + + src = fetchFromGitHub { + owner = "eXeC64"; + repo = "imv"; + rev = "v${version}"; + 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 = [ + 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; { + description = "A command line image viewer for tiling window managers"; + homepage = https://github.com/eXeC64/imv; + license = licenses.gpl2; + maintainers = with maintainers; [ rnhmjoj markus1189 ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} |