Merge pull request #117105 from yurrriq/noweb-prefer-boolean-over-null

noweb: add useIcon boolean arg
This commit is contained in:
Sandro 2021-03-21 17:22:59 +01:00 committed by GitHub
commit cb9f2fbf5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, nawk, groff, icon-lang }:
{ lib, stdenv, fetchFromGitHub, nawk, groff, icon-lang, useIcon ? true }:
lib.fix (noweb: stdenv.mkDerivation rec {
pname = "noweb";
@ -22,14 +22,14 @@ lib.fix (noweb: stdenv.mkDerivation rec {
substituteInPlace Makefile --replace 'strip' '${stdenv.cc.targetPrefix}strip'
'';
nativeBuildInputs = [ groff ] ++ lib.optionals (!isNull icon-lang) [ icon-lang ];
nativeBuildInputs = [ groff ] ++ lib.optionals useIcon [ icon-lang ];
buildInputs = [ nawk ];
preBuild = ''
mkdir -p "$out/lib/noweb"
'';
makeFlags = lib.optionals (!isNull icon-lang) [
makeFlags = lib.optionals useIcon [
"LIBSRC=icon"
"ICONC=icont"
] ++ [ "CC=${stdenv.cc.targetPrefix}cc" ];

View file

@ -12864,7 +12864,7 @@ in
gconf = pkgs.gnome2.GConf;
};
# NOTE: Override and set icon-lang = null to use Awk instead of Icon.
# NOTE: Override and set useIcon = false to use Awk instead of Icon.
noweb = callPackage ../development/tools/literate-programming/noweb { };
nuweb = callPackage ../development/tools/literate-programming/nuweb { tex = texlive.combined.scheme-medium; };