forked from mirrors/nixpkgs
Fix NIXOS_OZONE_WL
not working with 1Password
This commit is contained in:
parent
1119d15f27
commit
0cac23c7bf
|
@ -4,7 +4,7 @@
|
||||||
, version
|
, version
|
||||||
, src
|
, src
|
||||||
, meta
|
, meta
|
||||||
, makeWrapper
|
, makeShellWrapper
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
, alsa-lib
|
, alsa-lib
|
||||||
, at-spi2-atk
|
, at-spi2-atk
|
||||||
|
@ -49,7 +49,7 @@ let
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
inherit pname version src meta;
|
inherit pname version src meta;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
|
nativeBuildInputs = [ makeShellWrapper wrapGAppsHook ];
|
||||||
buildInputs = [ glib ];
|
buildInputs = [ glib ];
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
@ -120,12 +120,14 @@ in stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
|
# makeWrapper defaults to makeBinaryWrapper due to wrapGAppsHook
|
||||||
|
# but we need a shell wrapper specifically for `NIXOS_OZONE_WL`.
|
||||||
# Electron is trying to open udev via dlopen()
|
# Electron is trying to open udev via dlopen()
|
||||||
# and for some reason that doesn't seem to be impacted from the rpath.
|
# and for some reason that doesn't seem to be impacted from the rpath.
|
||||||
# Adding udev to LD_LIBRARY_PATH fixes that.
|
# Adding udev to LD_LIBRARY_PATH fixes that.
|
||||||
# Make xdg-open overrideable at runtime.
|
# Make xdg-open overrideable at runtime.
|
||||||
makeWrapper $out/share/1password/1password $out/bin/1password \
|
makeShellWrapper $out/share/1password/1password $out/bin/1password \
|
||||||
''${gappsWrapperArgs[@]} \
|
"''${gappsWrapperArgs[@]}" \
|
||||||
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
||||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]} \
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]} \
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
||||||
|
|
Loading…
Reference in a new issue