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

71 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-01-23 10:08:35 +01:00
, fetchurl
2021-01-17 04:51:22 +01:00
, pkg-config
2020-01-23 10:08:35 +01:00
, glib
, gpm
, file
, e2fsprogs
, libX11
, libICE
, perl
, zip
, unzip
, gettext
, slang
, libssh2
, openssl
, coreutils
, autoreconfHook
2020-01-23 10:08:35 +01:00
}:
stdenv.mkDerivation rec {
pname = "mc";
2021-01-30 17:39:04 +01:00
version = "4.8.26";
src = fetchurl {
2020-01-21 16:13:53 +01:00
url = "https://www.midnight-commander.org/downloads/${pname}-${version}.tar.xz";
2021-01-30 17:39:04 +01:00
sha256 = "sha256-xt6txQWV8tmiLcbCmanyizk+NYNG6/bKREqEadwWbCc=";
};
2021-01-17 04:51:22 +01:00
nativeBuildInputs = [ pkg-config autoreconfHook ];
2018-05-10 07:25:48 +02:00
buildInputs = [
2020-01-23 10:08:35 +01:00
file
gettext
glib
libICE
libX11
libssh2
openssl
perl
slang
unzip
zip
2021-01-15 10:19:50 +01:00
] ++ lib.optionals (!stdenv.isDarwin) [ e2fsprogs gpm ];
2018-05-10 07:25:48 +02:00
enableParallelBuilding = true;
2016-08-30 10:38:51 +02:00
configureFlags = [ "--enable-vfs-smb" ];
2020-01-23 10:08:35 +01:00
postPatch = ''
substituteInPlace src/filemanager/ext.c \
--replace /bin/rm ${coreutils}/bin/rm
'';
preFixup = ''
# 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
'';
meta = with lib; {
description = "File Manager and User Shell for the GNU Project";
2020-01-21 16:13:53 +01:00
downloadPage = "https://www.midnight-commander.org/downloads/";
2020-03-14 08:31:07 +01:00
homepage = "https://www.midnight-commander.org";
2020-01-23 10:08:35 +01:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ sander ];
platforms = with platforms; linux ++ darwin;
2020-03-14 08:31:07 +01:00
repositories.git = "https://github.com/MidnightCommander/mc.git";
2016-10-04 10:04:33 +02:00
updateWalker = true;
};
}