From 23b922c98a1941a37221104303a9201841e0c80c Mon Sep 17 00:00:00 2001 From: Josef Kemetmueller Date: Sun, 20 Nov 2016 20:27:29 +0100 Subject: [PATCH] mc: Fix darwin build We remove linux specific packages from the darwin build of midnight commander. Also slang wouldn't build on darwin without libiconv. --- pkgs/development/libraries/slang/default.nix | 4 ++-- pkgs/tools/misc/mc/default.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/slang/default.nix b/pkgs/development/libraries/slang/default.nix index a55173a62b3c..c4db48248f33 100644 --- a/pkgs/development/libraries/slang/default.nix +++ b/pkgs/development/libraries/slang/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses, pcre, libpng, zlib, readline }: +{ stdenv, fetchurl, ncurses, pcre, libpng, zlib, readline, libiconv }: stdenv.mkDerivation rec { name = "slang-2.3.0"; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { sed -i -e "s|-ltermcap|-lncurses|" ./configure ''; configureFlags = "--with-png=${libpng.dev} --with-z=${zlib.dev} --with-pcre=${pcre.dev} --with-readline=${readline.dev}"; - buildInputs = [ pcre libpng zlib readline ]; + buildInputs = [ pcre libpng zlib readline ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ libiconv ]; propagatedBuildInputs = [ ncurses ]; postInstall = '' diff --git a/pkgs/tools/misc/mc/default.nix b/pkgs/tools/misc/mc/default.nix index e840aa15ec20..0c9ac20fcc3e 100644 --- a/pkgs/tools/misc/mc/default.nix +++ b/pkgs/tools/misc/mc/default.nix @@ -10,8 +10,8 @@ stdenv.mkDerivation rec { sha256 = "1kmysm1x7smxs9k483nin6bx1rx0av8xrqjx9yf73hc7r4anhqzp"; }; - buildInputs = [ pkgconfig perl glib gpm slang zip unzip file gettext libX11 libICE e2fsprogs - libssh2 openssl ]; + buildInputs = [ pkgconfig perl glib slang zip unzip file gettext libX11 libICE + libssh2 openssl ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ e2fsprogs gpm ]; configureFlags = [ "--enable-vfs-smb" ]; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { repositories.git = git://github.com/MidnightCommander/mc.git; license = stdenv.lib.licenses.gpl2Plus; maintainers = [ stdenv.lib.maintainers.sander ]; - platforms = stdenv.lib.platforms.linux; + platforms = with stdenv.lib.platforms; linux ++ darwin; updateWalker = true; }; }