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

80 lines
1.6 KiB
Nix
Raw Normal View History

2020-01-23 01:08:35 -08:00
{ stdenv
, fetchurl
, pkgconfig
, glib
, gpm
, file
, e2fsprogs
, libX11
, libICE
, perl
, zip
, unzip
, gettext
, slang
, libssh2
, openssl
, coreutils
}:
stdenv.mkDerivation rec {
pname = "mc";
2020-01-21 07:13:53 -08:00
version = "4.8.24";
src = fetchurl {
2020-01-21 07:13:53 -08:00
url = "https://www.midnight-commander.org/downloads/${pname}-${version}.tar.xz";
sha256 = "0ikd2yql44p7nagmb08dmjqdwadclnvgr7ri9pmzc2s5f301r7w5";
};
2020-01-21 07:13:53 -08:00
preConfigure = ''
for f in \
./configure \
./config/ltmain.sh \
./m4/libtool.m4 \
; do
substituteInPlace $f --replace /usr/bin/file ${file}/bin/file
done
'';
nativeBuildInputs = [ pkgconfig ];
2018-05-09 22:25:48 -07:00
buildInputs = [
2020-01-23 01:08:35 -08:00
file
gettext
glib
libICE
libX11
libssh2
openssl
perl
slang
unzip
zip
2018-05-09 22:25:48 -07:00
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ e2fsprogs gpm ];
enableParallelBuilding = true;
2016-08-30 01:38:51 -07:00
configureFlags = [ "--enable-vfs-smb" ];
2020-01-23 01:08:35 -08: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 01:08:35 -08:00
meta = with stdenv.lib; {
description = "File Manager and User Shell for the GNU Project";
2020-01-21 07:13:53 -08:00
downloadPage = "https://www.midnight-commander.org/downloads/";
homepage = https://www.midnight-commander.org;
2020-01-23 01:08:35 -08:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ sander ];
platforms = with platforms; linux ++ darwin;
2014-04-03 00:30:47 -07:00
repositories.git = git://github.com/MidnightCommander/mc.git;
2016-10-04 01:04:33 -07:00
updateWalker = true;
};
}