nixpkgs/pkgs/tools/misc/mc/default.nix

71 lines
1.5 KiB
Nix
Raw Normal View History

2020-01-23 09:08:35 +00:00
{ stdenv
, fetchurl
, pkgconfig
, glib
, gpm
, file
, e2fsprogs
, libX11
, libICE
, perl
, zip
, unzip
, gettext
, slang
, libssh2
, openssl
, coreutils
, autoreconfHook
2020-01-23 09:08:35 +00:00
}:
stdenv.mkDerivation rec {
pname = "mc";
2020-07-25 10:22:56 +01:00
version = "4.8.25";
src = fetchurl {
2020-01-21 15:13:53 +00:00
url = "https://www.midnight-commander.org/downloads/${pname}-${version}.tar.xz";
2020-07-25 10:22:56 +01:00
sha256 = "12jlnabnc91xsm35g99g2wnh96jmznvrhffd18rj7fqfy8brdhgz";
};
nativeBuildInputs = [ pkgconfig autoreconfHook ];
2018-05-10 06:25:48 +01:00
buildInputs = [
2020-01-23 09:08:35 +00:00
file
gettext
glib
libICE
libX11
libssh2
openssl
perl
slang
unzip
zip
2018-05-10 06:25:48 +01:00
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ e2fsprogs gpm ];
enableParallelBuilding = true;
2016-08-30 09:38:51 +01:00
configureFlags = [ "--enable-vfs-smb" ];
2020-01-23 09:08:35 +00:00
postPatch = ''
substituteInPlace src/filemanager/ext.c \
--replace /bin/rm ${coreutils}/bin/rm
'';
postFixup = ''
# remove unwanted build-dependency references
sed -i -e "s!PKG_CONFIG_PATH=''${PKG_CONFIG_PATH}!PKG_CONFIG_PATH=$(echo "$PKG_CONFIG_PATH" | sed -e 's/./0/g')!" $out/bin/mc
'';
2020-01-23 09:08:35 +00:00
meta = with stdenv.lib; {
description = "File Manager and User Shell for the GNU Project";
2020-01-21 15:13:53 +00:00
downloadPage = "https://www.midnight-commander.org/downloads/";
2020-03-14 07:31:07 +00:00
homepage = "https://www.midnight-commander.org";
2020-01-23 09:08:35 +00:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ sander ];
platforms = with platforms; linux ++ darwin;
2020-03-14 07:31:07 +00:00
repositories.git = "https://github.com/MidnightCommander/mc.git";
2016-10-04 09:04:33 +01:00
updateWalker = true;
};
}