Merge pull request #187914 from elohmeier/nnn-musl

This commit is contained in:
Sandro 2022-08-28 23:18:54 +02:00 committed by GitHub
commit cd7918895f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@
, ncurses , ncurses
, readline , readline
, which , which
, musl-fts
# options # options
, conf ? null , conf ? null
, withIcons ? false , withIcons ? false
@ -33,7 +34,10 @@ stdenv.mkDerivation rec {
preBuild = lib.optionalString (conf != null) "cp ${configFile} src/nnn.h"; preBuild = lib.optionalString (conf != null) "cp ${configFile} src/nnn.h";
nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ]; 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"}" ] makeFlags = [ "PREFIX=${placeholder "out"}" ]
++ lib.optional withIcons [ "O_ICONS=1" ] ++ lib.optional withIcons [ "O_ICONS=1" ]