vifm: add vifm-full package
vifm includes some optional features what are currently no-op due
to missing dependencies. Once such example is `vifm-media`.
vimfm-media is a Linux script included with vifm which can be used to
mount/umount removable media from within vifm. However, vifm-media
has additional dependencies, namely Python, dbus, and a supported
back-end such as udisks2. While vimfm-media is currently installed,
it fails with the error "No supported backend found."
This change adds optional support for vifm-media via the new package
vifm-full; Opening for the opportunity to add whatever optional
dependencies I have not considered in this change in the future,
while not generously increasing the closure size of the original
vifm package.
For reference, vifm has a closure size of 41,164,432 while the new
vifm-full increases this to 382,642,536. Calculated with
`nix path-info -S`
Note: While vifm-media supports numerous back-ends, this change only
adds support for udisks2. In addition, vifm-media is not supported on
MacOS/OSX, for which upstream provides an alternative script.
2019-12-02 10:45:04 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
2023-02-08 08:24:36 +00:00
|
|
|
, perl # used to generate help tags
|
2021-01-17 02:09:27 +00:00
|
|
|
, 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
|
vifm: add vifm-full package
vifm includes some optional features what are currently no-op due
to missing dependencies. Once such example is `vifm-media`.
vimfm-media is a Linux script included with vifm which can be used to
mount/umount removable media from within vifm. However, vifm-media
has additional dependencies, namely Python, dbus, and a supported
back-end such as udisks2. While vimfm-media is currently installed,
it fails with the error "No supported backend found."
This change adds optional support for vifm-media via the new package
vifm-full; Opening for the opportunity to add whatever optional
dependencies I have not considered in this change in the future,
while not generously increasing the closure size of the original
vifm package.
For reference, vifm has a closure size of 41,164,432 while the new
vifm-full increases this to 382,642,536. Calculated with
`nix path-info -S`
Note: While vifm-media supports numerous back-ends, this change only
adds support for udisks2. In addition, vifm-media is not supported on
MacOS/OSX, for which upstream provides an alternative script.
2019-12-02 10:45:04 +00:00
|
|
|
|
|
|
|
# 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
|
2023-04-05 07:35:51 +01:00
|
|
|
, gitUpdater
|
2016-06-03 15:09:20 +01:00
|
|
|
}:
|
2011-08-10 20:16:27 +01:00
|
|
|
|
vifm: add vifm-full package
vifm includes some optional features what are currently no-op due
to missing dependencies. Once such example is `vifm-media`.
vimfm-media is a Linux script included with vifm which can be used to
mount/umount removable media from within vifm. However, vifm-media
has additional dependencies, namely Python, dbus, and a supported
back-end such as udisks2. While vimfm-media is currently installed,
it fails with the error "No supported backend found."
This change adds optional support for vifm-media via the new package
vifm-full; Opening for the opportunity to add whatever optional
dependencies I have not considered in this change in the future,
while not generously increasing the closure size of the original
vifm package.
For reference, vifm has a closure size of 41,164,432 while the new
vifm-full increases this to 382,642,536. Calculated with
`nix path-info -S`
Note: While vifm-media supports numerous back-ends, this change only
adds support for udisks2. In addition, vifm-media is not supported on
MacOS/OSX, for which upstream provides an alternative script.
2019-12-02 10:45:04 +00:00
|
|
|
let isFullPackage = mediaSupport;
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = if isFullPackage then "vifm-full" else "vifm";
|
2023-04-05 07:35:51 +01:00
|
|
|
version = "0.13";
|
2013-08-10 01:32:21 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-07-02 09:27:20 +01:00
|
|
|
url = "https://github.com/vifm/vifm/releases/download/v${version}/vifm-${version}.tar.bz2";
|
2023-04-05 07:35:51 +01:00
|
|
|
hash = "sha256-DZKTdJp5QHat6Wfs3EfRQdheRQNwWUdlORvfGpvUUHU=";
|
2011-08-10 20:16:27 +01:00
|
|
|
};
|
|
|
|
|
2023-02-08 08:24:36 +00:00
|
|
|
nativeBuildInputs = [ perl pkg-config makeWrapper ];
|
2020-11-24 15:29:28 +00:00
|
|
|
buildInputs = [ ncurses libX11 util-linux file which groff ];
|
2011-08-10 20:16:27 +01:00
|
|
|
|
2023-02-08 08:24:36 +00:00
|
|
|
postPatch = ''
|
2023-04-05 07:35:51 +01:00
|
|
|
# Avoid '#!/usr/bin/env perl' references to build help.
|
2023-02-08 08:24:36 +00:00
|
|
|
patchShebangs --build src/helpztags
|
|
|
|
'';
|
|
|
|
|
vifm: add vifm-full package
vifm includes some optional features what are currently no-op due
to missing dependencies. Once such example is `vifm-media`.
vimfm-media is a Linux script included with vifm which can be used to
mount/umount removable media from within vifm. However, vifm-media
has additional dependencies, namely Python, dbus, and a supported
back-end such as udisks2. While vimfm-media is currently installed,
it fails with the error "No supported backend found."
This change adds optional support for vifm-media via the new package
vifm-full; Opening for the opportunity to add whatever optional
dependencies I have not considered in this change in the future,
while not generously increasing the closure size of the original
vifm package.
For reference, vifm has a closure size of 41,164,432 while the new
vifm-full increases this to 382,642,536. Calculated with
`nix path-info -S`
Note: While vifm-media supports numerous back-ends, this change only
adds support for udisks2. In addition, vifm-media is not supported on
MacOS/OSX, for which upstream provides an alternative script.
2019-12-02 10:45:04 +00:00
|
|
|
postFixup = let
|
2020-09-27 03:33:03 +01:00
|
|
|
path = lib.makeBinPath
|
|
|
|
[ udisks2
|
vifm: add vifm-full package
vifm includes some optional features what are currently no-op due
to missing dependencies. Once such example is `vifm-media`.
vimfm-media is a Linux script included with vifm which can be used to
mount/umount removable media from within vifm. However, vifm-media
has additional dependencies, namely Python, dbus, and a supported
back-end such as udisks2. While vimfm-media is currently installed,
it fails with the error "No supported backend found."
This change adds optional support for vifm-media via the new package
vifm-full; Opening for the opportunity to add whatever optional
dependencies I have not considered in this change in the future,
while not generously increasing the closure size of the original
vifm package.
For reference, vifm has a closure size of 41,164,432 while the new
vifm-full increases this to 382,642,536. Calculated with
`nix path-info -S`
Note: While vifm-media supports numerous back-ends, this change only
adds support for udisks2. In addition, vifm-media is not supported on
MacOS/OSX, for which upstream provides an alternative script.
2019-12-02 10:45:04 +00:00
|
|
|
(python3.withPackages (p: [p.dbus-python]))
|
|
|
|
];
|
|
|
|
|
|
|
|
wrapVifmMedia = "wrapProgram $out/share/vifm/vifm-media --prefix PATH : ${path}";
|
|
|
|
in ''
|
2023-02-06 20:49:02 +00:00
|
|
|
${lib.optionalString mediaSupport wrapVifmMedia}
|
vifm: add vifm-full package
vifm includes some optional features what are currently no-op due
to missing dependencies. Once such example is `vifm-media`.
vimfm-media is a Linux script included with vifm which can be used to
mount/umount removable media from within vifm. However, vifm-media
has additional dependencies, namely Python, dbus, and a supported
back-end such as udisks2. While vimfm-media is currently installed,
it fails with the error "No supported backend found."
This change adds optional support for vifm-media via the new package
vifm-full; Opening for the opportunity to add whatever optional
dependencies I have not considered in this change in the future,
while not generously increasing the closure size of the original
vifm package.
For reference, vifm has a closure size of 41,164,432 while the new
vifm-full increases this to 382,642,536. Calculated with
`nix path-info -S`
Note: While vifm-media supports numerous back-ends, this change only
adds support for udisks2. In addition, vifm-media is not supported on
MacOS/OSX, for which upstream provides an alternative script.
2019-12-02 10:45:04 +00:00
|
|
|
'';
|
|
|
|
|
2023-04-05 07:35:51 +01:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
url = "https://github.com/vifm/vifm.git";
|
|
|
|
rev-prefix = "v";
|
|
|
|
ignoredVersions = "beta";
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-02-06 20:49:02 +00:00
|
|
|
description = "A vi-like file manager${lib.optionalString isFullPackage "; Includes support for optional features"}";
|
2019-07-03 10:27:39 +01:00
|
|
|
maintainers = with maintainers; [ raskin ];
|
vifm: add vifm-full package
vifm includes some optional features what are currently no-op due
to missing dependencies. Once such example is `vifm-media`.
vimfm-media is a Linux script included with vifm which can be used to
mount/umount removable media from within vifm. However, vifm-media
has additional dependencies, namely Python, dbus, and a supported
back-end such as udisks2. While vimfm-media is currently installed,
it fails with the error "No supported backend found."
This change adds optional support for vifm-media via the new package
vifm-full; Opening for the opportunity to add whatever optional
dependencies I have not considered in this change in the future,
while not generously increasing the closure size of the original
vifm package.
For reference, vifm has a closure size of 41,164,432 while the new
vifm-full increases this to 382,642,536. Calculated with
`nix path-info -S`
Note: While vifm-media supports numerous back-ends, this change only
adds support for udisks2. In addition, vifm-media is not supported on
MacOS/OSX, for which upstream provides an alternative script.
2019-12-02 10:45:04 +00:00
|
|
|
platforms = if mediaSupport then platforms.linux else platforms.unix;
|
2016-06-03 15:09:20 +01:00
|
|
|
license = licenses.gpl2;
|
2018-01-05 19:42:46 +00:00
|
|
|
downloadPage = "https://vifm.info/downloads.shtml";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://vifm.info/";
|
2021-02-10 22:17:27 +00:00
|
|
|
changelog = "https://github.com/vifm/vifm/blob/v${version}/ChangeLog";
|
2011-08-10 20:16:27 +01:00
|
|
|
};
|
2013-08-10 01:32:21 +01:00
|
|
|
}
|