1 { stdenv, fetchurl, makeWrapper
2 , perl # used to generate help tags
7 # adds support for handling removable media (vifm-media). Linux only!
8 , mediaSupport ? false, python3 ? null, udisks2 ? null, lib ? null
12 let isFullPackage = mediaSupport;
13 in stdenv.mkDerivation rec {
14 pname = if isFullPackage then "vifm-full" else "vifm";
18 url = "https://github.com/vifm/vifm/releases/download/v${version}/vifm-${version}.tar.bz2";
19 hash = "sha256-DZKTdJp5QHat6Wfs3EfRQdheRQNwWUdlORvfGpvUUHU=";
22 nativeBuildInputs = [ perl pkg-config makeWrapper ];
23 buildInputs = [ ncurses libX11 file which groff ];
26 # Avoid '#!/usr/bin/env perl' references to build help.
27 patchShebangs --build src/helpztags
31 path = lib.makeBinPath
33 (python3.withPackages (p: [p.dbus-python]))
36 wrapVifmMedia = "wrapProgram $out/share/vifm/vifm-media --prefix PATH : ${path}";
38 ${lib.optionalString mediaSupport wrapVifmMedia}
41 passthru.updateScript = gitUpdater {
42 url = "https://github.com/vifm/vifm.git";
44 ignoredVersions = "beta";
48 description = "Vi-like file manager${lib.optionalString isFullPackage "; Includes support for optional features"}";
49 maintainers = with maintainers; [ raskin ];
50 platforms = if mediaSupport then platforms.linux else platforms.unix;
51 license = licenses.gpl2;
52 downloadPage = "https://vifm.info/downloads.shtml";
53 homepage = "https://vifm.info/";
54 changelog = "https://github.com/vifm/vifm/blob/v${version}/ChangeLog";