3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/vifm/default.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper
, pkg-config
2016-06-03 15:09:20 +01:00
, ncurses, libX11
2020-11-24 15:29:28 +00:00
, util-linux, file, which, groff
# adds support for handling removable media (vifm-media). Linux only!
2020-09-27 03:33:03 +01:00
, mediaSupport ? false, python3 ? null, udisks2 ? null, lib ? null
2016-06-03 15:09:20 +01:00
}:
let isFullPackage = mediaSupport;
in stdenv.mkDerivation rec {
pname = if isFullPackage then "vifm-full" else "vifm";
2020-09-27 03:33:03 +01:00
version = "0.11";
src = fetchurl {
2017-07-02 09:27:20 +01:00
url = "https://github.com/vifm/vifm/releases/download/v${version}/vifm-${version}.tar.bz2";
2020-09-27 03:33:03 +01:00
sha256 = "0rqyd424y0g5b5basw2ybb60r9gar4f40d1xgzr3c2dsy4jpwvyh";
};
nativeBuildInputs = [ pkg-config makeWrapper ];
2020-11-24 15:29:28 +00:00
buildInputs = [ ncurses libX11 util-linux file which groff ];
postFixup = let
2020-09-27 03:33:03 +01:00
path = lib.makeBinPath
[ udisks2
(python3.withPackages (p: [p.dbus-python]))
];
wrapVifmMedia = "wrapProgram $out/share/vifm/vifm-media --prefix PATH : ${path}";
in ''
${if mediaSupport then wrapVifmMedia else ""}
'';
meta = with lib; {
description = "A vi-like file manager${if isFullPackage then "; Includes support for optional features" else ""}";
maintainers = with maintainers; [ raskin ];
platforms = if mediaSupport then platforms.linux else platforms.unix;
2016-06-03 15:09:20 +01:00
license = licenses.gpl2;
downloadPage = "https://vifm.info/downloads.shtml";
homepage = "https://vifm.info/";
updateWalker = true;
2021-02-10 22:17:27 +00:00
changelog = "https://github.com/vifm/vifm/blob/v${version}/ChangeLog";
};
}