Merge pull request #75004 from emmanuelrosa/vifm-full
vifm: refactor to add a vifm-full package
This commit is contained in:
commit
769f4308f4
@ -1,11 +1,15 @@
|
|||||||
{ stdenv, fetchurl
|
{ stdenv, fetchurl, makeWrapper
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, ncurses, libX11
|
, ncurses, libX11
|
||||||
, utillinux, file, which, groff
|
, utillinux, file, which, groff
|
||||||
|
|
||||||
|
# adds support for handling removable media (vifm-media). Linux only!
|
||||||
|
, mediaSupport ? false, python3 ? null, udisks2 ? null, lib ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let isFullPackage = mediaSupport;
|
||||||
pname = "vifm";
|
in stdenv.mkDerivation rec {
|
||||||
|
pname = if isFullPackage then "vifm-full" else "vifm";
|
||||||
version = "0.10.1";
|
version = "0.10.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -13,13 +17,24 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r";
|
sha256 = "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig makeWrapper ];
|
||||||
buildInputs = [ ncurses libX11 utillinux file which groff ];
|
buildInputs = [ ncurses libX11 utillinux file which groff ];
|
||||||
|
|
||||||
|
postFixup = let
|
||||||
|
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 stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A vi-like file manager";
|
description = ''A vi-like file manager${if isFullPackage then "; Includes support for optional features" else ""}'';
|
||||||
maintainers = with maintainers; [ raskin ];
|
maintainers = with maintainers; [ raskin ];
|
||||||
platforms = platforms.unix;
|
platforms = if mediaSupport then platforms.linux else platforms.unix;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
downloadPage = "https://vifm.info/downloads.shtml";
|
downloadPage = "https://vifm.info/downloads.shtml";
|
||||||
homepage = https://vifm.info/;
|
homepage = https://vifm.info/;
|
||||||
|
@ -6942,6 +6942,11 @@ in
|
|||||||
|
|
||||||
vifm = callPackage ../applications/misc/vifm { };
|
vifm = callPackage ../applications/misc/vifm { };
|
||||||
|
|
||||||
|
vifm-full = callPackage ../applications/misc/vifm {
|
||||||
|
mediaSupport = true;
|
||||||
|
inherit lib udisks2 python3;
|
||||||
|
};
|
||||||
|
|
||||||
viking = callPackage ../applications/misc/viking {
|
viking = callPackage ../applications/misc/viking {
|
||||||
inherit (gnome2) scrollkeeper;
|
inherit (gnome2) scrollkeeper;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user