linux: inside nix-shell, allow make menuconfig

Use stdenv.lib.inNixShell to check for nix-shell and potentially bring pkgconfig/ncurses.
This commit is contained in:
Matthieu Coudron 2018-10-05 18:00:15 +09:00
parent 8bc64b6c24
commit e80324c625

View File

@ -1,4 +1,5 @@
{ buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
, pkgconfig ? null, ncurses ? null
, libelf
, utillinux
, writeTextFile
@ -265,6 +266,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
++ optional (stdenv.lib.versionAtLeast version "4.14") libelf
++ optional (stdenv.lib.versionAtLeast version "4.15") utillinux
++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
++ optionals stdenv.lib.inNixShell [ pkgconfig ncurses ]
;
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" ];