10 , enableJavaScript ? stdenv.isDarwin || lib.meta.availableOn stdenv.hostPlatform duktape
13 , gsettings-desktop-schemas
22 stdenv.mkDerivation rec {
26 src = fetchFromGitHub {
30 hash = "sha256-pqj1LwRdOK2CUu3hYIsogQIXxWzShDuKEbDTbtWkgnQ=";
33 patches = lib.optionals stdenv.isDarwin [
34 # https://github.com/libproxy/libproxy/pull/189
36 url = "https://github.com/libproxy/libproxy/commit/4331b9db427ce2c25ff5eeb597bec4bc35ed1a0b.patch";
37 sha256 = "sha256-uTh3rYVvEke1iWVHsT3Zj2H1F+gyLrffcmyt0JEKaCA=";
41 outputs = [ "out" "dev" "py3" ];
53 ] ++ lib.optionals enableJavaScript [
54 (if stdenv.hostPlatform.isDarwin then JavaScriptCore else duktape)
55 ] ++ (if stdenv.hostPlatform.isDarwin then [
66 "-DPYTHON3_SITEPKG_DIR=${placeholder "py3"}/${python3.sitePackages}"
67 ] ++ lib.optional (enableJavaScript && !stdenv.hostPlatform.isDarwin) "-DWITH_MOZJS=ON";
69 postFixup = lib.optionalString stdenv.isLinux ''
70 # config_gnome3 uses the helper to find GNOME proxy settings
71 wrapProgram $out/libexec/pxgsettings --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
74 doCheck = false; # fails 1 out of 10 tests
77 platforms = platforms.linux ++ platforms.darwin;
78 license = licenses.lgpl21;
79 homepage = "http://libproxy.github.io/libproxy/";
80 description = "A library that provides automatic proxy configuration management";