Merge pull request #126558 from zhaofengli/libproxy-optional-js
libproxy: Make JavaScript optional
This commit is contained in:
commit
21f3b2b50b
2 changed files with 8 additions and 5 deletions
|
@ -96,6 +96,7 @@ in stdenv.mkDerivation rec {
|
||||||
homepage = "https://developer.mozilla.org/en/SpiderMonkey";
|
homepage = "https://developer.mozilla.org/en/SpiderMonkey";
|
||||||
license = licenses.gpl2; # TODO: MPL/GPL/LGPL tri-license.
|
license = licenses.gpl2; # TODO: MPL/GPL/LGPL tri-license.
|
||||||
maintainers = [ maintainers.abbradar ];
|
maintainers = [ maintainers.abbradar ];
|
||||||
|
badPlatforms = [ "riscv32-linux" "riscv64-linux" ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
, zlib
|
, zlib
|
||||||
, dbus
|
, dbus
|
||||||
, networkmanager
|
, networkmanager
|
||||||
|
, enableJavaScript ? stdenv.isDarwin || lib.meta.availableOn stdenv.hostPlatform spidermonkey_68
|
||||||
, spidermonkey_68
|
, spidermonkey_68
|
||||||
, pcre
|
, pcre
|
||||||
, gsettings-desktop-schemas
|
, gsettings-desktop-schemas
|
||||||
|
@ -16,7 +17,9 @@
|
||||||
, JavaScriptCore
|
, JavaScriptCore
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
jsRuntime = if stdenv.hostPlatform.isDarwin then JavaScriptCore else spidermonkey_68;
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "libproxy";
|
pname = "libproxy";
|
||||||
version = "0.4.17";
|
version = "0.4.17";
|
||||||
|
|
||||||
|
@ -39,22 +42,21 @@ stdenv.mkDerivation rec {
|
||||||
pcre
|
pcre
|
||||||
python3
|
python3
|
||||||
zlib
|
zlib
|
||||||
|
] ++ lib.optionals enableJavaScript [
|
||||||
|
jsRuntime
|
||||||
] ++ (if stdenv.hostPlatform.isDarwin then [
|
] ++ (if stdenv.hostPlatform.isDarwin then [
|
||||||
SystemConfiguration
|
SystemConfiguration
|
||||||
CoreFoundation
|
CoreFoundation
|
||||||
JavaScriptCore
|
|
||||||
] else [
|
] else [
|
||||||
glib
|
glib
|
||||||
spidermonkey_68
|
|
||||||
dbus
|
dbus
|
||||||
networkmanager
|
networkmanager
|
||||||
]);
|
]);
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DWITH_MOZJS=ON"
|
|
||||||
"-DWITH_PYTHON2=OFF"
|
"-DWITH_PYTHON2=OFF"
|
||||||
"-DPYTHON3_SITEPKG_DIR=${placeholder "py3"}/${python3.sitePackages}"
|
"-DPYTHON3_SITEPKG_DIR=${placeholder "py3"}/${python3.sitePackages}"
|
||||||
];
|
] ++ lib.optional (enableJavaScript && !stdenv.hostPlatform.isDarwin) "-DWITH_MOZJS=ON";
|
||||||
|
|
||||||
postFixup = lib.optionalString stdenv.isLinux ''
|
postFixup = lib.optionalString stdenv.isLinux ''
|
||||||
# config_gnome3 uses the helper to find GNOME proxy settings
|
# config_gnome3 uses the helper to find GNOME proxy settings
|
||||||
|
|
Loading…
Reference in a new issue