3 _experimental-update-script-combinators,
11 gobject-introspection,
12 gsettings-desktop-schemas,
13 makeHardcodeGsettingsPatch,
22 stdenv.mkDerivation (finalAttrs: {
32 src = fetchFromGitHub {
35 rev = finalAttrs.version;
36 hash = "sha256-Z70TjLk5zulyYMAK+uMDhpsdvLa6m25pY8jahUA6ASE=";
42 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
43 # Disable schema presence detection, it would fail because it cannot be autopatched,
44 # and it will be hardcoded by the next patch anyway.
45 ./skip-gsettings-detection.patch
47 # Hardcode path to Settings schemas for GNOME & related desktops.
48 # Otherwise every app using libproxy would need to be wrapped individually.
50 src = ./hardcode-gsettings.patch;
51 gds = glib.getSchemaPath gsettings-desktop-schemas;
56 # Fix running script that will try to install git hooks.
57 # Though it will not do anything since we do not keep .git/ directory.
58 # https://github.com/libproxy/libproxy/issues/262
59 chmod +x data/install-git-hook.sh
60 patchShebangs data/install-git-hook.sh
62 # Fix include-path propagation in non-static builds.
63 # https://github.com/libproxy/libproxy/pull/239#issuecomment-2056620246
64 substituteInPlace src/libproxy/meson.build \
65 --replace-fail "requires_private: 'gobject-2.0'" "requires: 'gobject-2.0'"
83 if stdenv.hostPlatform.isDarwin then
84 (with darwin.apple_sdk.frameworks; [
90 gsettings-desktop-schemas
96 # Prevent installing commit hook.
99 ++ lib.optionals stdenv.hostPlatform.isDarwin [
100 "-Dconfig-gnome=false"
103 doCheck = !stdenv.hostPlatform.isDarwin;
106 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
107 moveToOutput "share/doc" "$devdoc"
111 hardcodeGsettingsPatch = makeHardcodeGsettingsPatch {
112 schemaIdToVariableMapping = {
113 "org.gnome.system.proxy" = "gds";
114 "org.gnome.system.proxy.http" = "gds";
115 "org.gnome.system.proxy.https" = "gds";
116 "org.gnome.system.proxy.ftp" = "gds";
117 "org.gnome.system.proxy.socks" = "gds";
119 inherit (finalAttrs) src;
124 updateSource = gitUpdater { };
125 updatePatch = _experimental-update-script-combinators.copyAttrOutputToFile "libproxy.hardcodeGsettingsPatch" ./hardcode-gsettings.patch;
127 _experimental-update-script-combinators.sequence [
134 description = "Library that provides automatic proxy configuration management";
135 homepage = "https://libproxy.github.io/libproxy/";
136 license = licenses.lgpl21Plus;
137 platforms = platforms.linux ++ platforms.darwin;
138 mainProgram = "proxy";