From 7f1b396889851e7e924bfd72b89d14925480132c Mon Sep 17 00:00:00 2001 From: Enno Richter Date: Mon, 22 Aug 2022 21:49:53 +0200 Subject: [PATCH] nnn: fix musl build --- pkgs/applications/file-managers/nnn/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/file-managers/nnn/default.nix b/pkgs/applications/file-managers/nnn/default.nix index eed48c4a7d77..85c372f00406 100644 --- a/pkgs/applications/file-managers/nnn/default.nix +++ b/pkgs/applications/file-managers/nnn/default.nix @@ -8,6 +8,7 @@ , ncurses , readline , which +, musl-fts # options , conf ? null , withIcons ? false @@ -33,7 +34,10 @@ stdenv.mkDerivation rec { preBuild = lib.optionalString (conf != null) "cp ${configFile} src/nnn.h"; nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ]; - buildInputs = [ readline ncurses ]; + buildInputs = [ readline ncurses ] ++ lib.optional stdenv.hostPlatform.isMusl musl-fts; + + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-I${musl-fts}/include"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts"; makeFlags = [ "PREFIX=${placeholder "out"}" ] ++ lib.optional withIcons [ "O_ICONS=1" ]