3
0
Fork 0
forked from mirrors/nixpkgs

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
, 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" ]