Merge pull request #269009 from slotThe/emacs/withFeature

emacs: Use lib.withFeature
This commit is contained in:
Atemu 2023-12-03 22:13:31 +01:00 committed by GitHub
commit ab59f0dacc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -329,15 +329,16 @@ mkDerivation (finalAttrs: {
"--with-xml2=yes"
]
++ (lib.optional stdenv.isDarwin (lib.withFeature withNS "ns"))
++ lib.optional (!withToolkitScrollBars) "--without-toolkit-scroll-bars"
++ lib.optional withNativeCompilation "--with-native-compilation"
++ lib.optional withImageMagick "--with-imagemagick"
++ lib.optional withTreeSitter "--with-tree-sitter"
++ lib.optional withXinput2 "--with-xinput2"
++ lib.optional withXwidgets "--with-xwidgets"
++ lib.optional withSmallJaDic "--with-small-ja-dic"
++ lib.optional (!withCompressInstall) "--without-compress-install"
;
++ [
(lib.withFeature withCompressInstall "compress-install")
(lib.withFeature withToolkitScrollBars "toolkit-scroll-bars")
(lib.withFeature withNativeCompilation "native-compilation")
(lib.withFeature withImageMagick "imagemagick")
(lib.withFeature withSmallJaDic "small-ja-dic")
(lib.withFeature withTreeSitter "tree-sitter")
(lib.withFeature withXinput2 "xinput2")
(lib.withFeature withXwidgets "xwidgets")
];
env = lib.optionalAttrs withNativeCompilation {
NATIVE_FULL_AOT = "1";