From 7e0126da2cb15258fa2ba0f6056948a30ead56dc Mon Sep 17 00:00:00 2001 From: Izorkin Date: Sun, 5 Feb 2023 11:23:54 +0300 Subject: [PATCH 1/3] mc: add x11Support option --- pkgs/applications/file-managers/mc/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/file-managers/mc/default.nix b/pkgs/applications/file-managers/mc/default.nix index 8b54d79622a4..a03a1addb437 100644 --- a/pkgs/applications/file-managers/mc/default.nix +++ b/pkgs/applications/file-managers/mc/default.nix @@ -6,7 +6,6 @@ , gpm , file , e2fsprogs -, libX11 , libICE , perl , zip @@ -17,6 +16,7 @@ , openssl , coreutils , autoSignDarwinBinariesHook +, x11Support ? true, libX11 # updater only , writeScript @@ -43,12 +43,12 @@ stdenv.mkDerivation rec { gettext glib libICE - libX11 libssh2 openssl slang zip - ] ++ lib.optionals (!stdenv.isDarwin) [ e2fsprogs gpm ]; + ] ++ lib.optional x11Support [ libX11 ] + ++ lib.optionals (!stdenv.isDarwin) [ e2fsprogs gpm ]; enableParallelBuilding = true; @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { --replace /bin/cat ${coreutils}/bin/cat ''; - postFixup = lib.optionalString (!stdenv.isDarwin) '' + postFixup = lib.optionalString ((!stdenv.isDarwin) && x11Support) '' # libX11.so is loaded dynamically so autopatch doesn't detect it patchelf \ --add-needed ${libX11}/lib/libX11.so \ From 0556ca0f88a30006a3833c3c675db4677c978d5b Mon Sep 17 00:00:00 2001 From: Izorkin Date: Sun, 5 Feb 2023 11:45:10 +0300 Subject: [PATCH 2/3] mc: update postPatch phase --- pkgs/applications/file-managers/mc/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/applications/file-managers/mc/default.nix b/pkgs/applications/file-managers/mc/default.nix index a03a1addb437..d45e6a699aeb 100644 --- a/pkgs/applications/file-managers/mc/default.nix +++ b/pkgs/applications/file-managers/mc/default.nix @@ -66,9 +66,6 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/filemanager/ext.c \ --replace /bin/rm ${coreutils}/bin/rm - - substituteInPlace misc/ext.d/misc.sh.in \ - --replace /bin/cat ${coreutils}/bin/cat ''; postFixup = lib.optionalString ((!stdenv.isDarwin) && x11Support) '' From 686eda481722be84eabea3fc9c72cb9dea39e6a0 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Sun, 5 Feb 2023 11:46:41 +0300 Subject: [PATCH 3/3] nixos/no-x-libs: add mc --- nixos/modules/config/no-x-libs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix index 1d0bc73cac2a..f2d4df85e0ea 100644 --- a/nixos/modules/config/no-x-libs.nix +++ b/nixos/modules/config/no-x-libs.nix @@ -46,6 +46,7 @@ with lib; libextractor = super.libextractor.override { gtkSupport = false; }; libva = super.libva-minimal; limesuite = super.limesuite.override { withGui = false; }; + mc = super.mc.override { x11Support = false; }; mpv-unwrapped = super.mpv-unwrapped.override { sdl2Support = false; x11Support = false; }; msmtp = super.msmtp.override { withKeyring = false; }; networkmanager-fortisslvpn = super.networkmanager-fortisslvpn.override { withGnome = false; };