3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/webkitgtk
zseri bed1ee0548 webkitgtk: make it easier to disable avahi globally by fixing enableGeoLocation option
The problem with enableGeoLocation was that it didn't compose well with
.overrideAttrs and setting geoclue2=null at the overlay level
because of the assert statement.

Thus, when combined with disabling libsecret, the resulting override code was:
  avahi = null;
  geoclue2 = { outPath = throw "geoclue is disabled"; };
  webkitgtk = prev.lib.pipe prev.webkitgtk [
    (x: x.override { enableGeoLocation = false; geoclue2 = prev.geoclue2; })
    (x: x.overrideAttrs (old: { cmakeFlags = old.cmakeFlags ++ [ "-DUSE_LIBSECRET=OFF" ]; }))
    (x: x.override { enableGeoLocation = false; geoclue2 = null; libsecret = null; })
  ];

It works, but is unnecessarily complex.

: detailed motviation
libsecret and geoclue2 are actually completely independent,
the real conflict is between assert and override/overrideAttrs which
don't work as expected; e.g. you can pass an updated parameter, but the
original parameter at callPackage "calltime" after recusion through overlays
gets used, so when globally setting "geoclue2=null;" in an overlay,
the assert is always hit without any way to work around that
2022-02-23 23:38:05 +01:00
..
default.nix webkitgtk: make it easier to disable avahi globally by fixing enableGeoLocation option 2022-02-23 23:38:05 +01:00
fix-bubblewrap-paths.patch
libglvnd-headers.patch