5 , gobject-introspection
18 src = fetchFromGitHub {
22 hash = "sha256-wAQFx0DKLLKztETAz1eM+eBFiAkSCgd8qqRtLV1Kz9g=";
26 substituteInPlace gui/src/{linux/main.py,linux/monitors/dbus_monitor.py,gui/settings.py} \
27 --replace-fail "python3" "${(python3.buildEnv.override { extraLibs = pythonPath; }).interpreter}"
29 substituteInPlace gui/com.quexten.Goldwarden.desktop \
30 --replace-fail "Exec=goldwarden_ui_main.py" "Exec=$out/bin/goldwarden-gui"
32 substituteInPlace gui/src/gui/resources/commands.json \
33 --replace-fail "flatpak run --filesystem=home --command=goldwarden com.quexten.Goldwarden" "goldwarden" \
34 --replace-fail "flatpak run --command=goldwarden com.quexten.Goldwarden" "goldwarden" \
35 --replace-fail 'SSH_AUTH_SOCK=/home/$USER/.var/app/com.quexten.Goldwarden/data/ssh-auth-sock' 'SSH_AUTH_SOCK=/home/$USER/.goldwarden-ssh-agent.sock'
37 substituteInPlace cli/browserbiometrics/chrome-com.8bit.bitwarden.json cli/browserbiometrics/mozilla-com.8bit.bitwarden.json \
38 --replace-fail "@PATH@" "$out/bin/goldwarden"
41 vendorHash = "sha256-zWACjW/WZC0ZLmRV1VwcRROG218PCZ6aCPOreCG/5sE=";
43 ldflags = [ "-s" "-w" ];
48 python3.pkgs.wrapPython
59 pythonPath = with python3.pkgs; [
66 blueprint-compiler batch-compile gui/src/gui/.templates/ gui/src/gui/ gui/src/gui/*.blp
67 chmod +x gui/goldwarden_ui_main.py
69 mkdir -p $out/share/goldwarden
70 cp -r gui/* $out/share/goldwarden/
71 ln -s $out/share/goldwarden/goldwarden_ui_main.py $out/bin/goldwarden-gui
72 rm $out/share/goldwarden/{com.quexten.Goldwarden.desktop,com.quexten.Goldwarden.metainfo.xml,com.quexten.Goldwarden.svg,python3-requirements.json,requirements.txt}
74 install -D gui/com.quexten.Goldwarden.desktop -t $out/share/applications
75 install -D gui/com.quexten.Goldwarden.svg -t $out/share/icons/hicolor/scalable/apps
76 install -Dm644 gui/com.quexten.Goldwarden.metainfo.xml -t $out/share/metainfo
77 install -Dm644 cli/resources/com.quexten.goldwarden.policy -t $out/share/polkit-1/actions
79 install -D cli/browserbiometrics/chrome-com.8bit.bitwarden.json $out/etc/chrome/native-messaging-hosts/com.8bit.bitwarden.json
80 install -D cli/browserbiometrics/chrome-com.8bit.bitwarden.json $out/etc/chromium/native-messaging-hosts/com.8bit.bitwarden.json
81 install -D cli/browserbiometrics/chrome-com.8bit.bitwarden.json $out/etc/edge/native-messaging-hosts/com.8bit.bitwarden.json
82 install -D cli/browserbiometrics/mozilla-com.8bit.bitwarden.json $out/lib/mozilla/native-messaging-hosts/com.8bit.bitwarden.json
87 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
88 wrapPythonProgramsIn $out/share/goldwarden "$out/share/goldwarden $pythonPath"
92 description = "Feature-packed Bitwarden compatible desktop integration";
93 homepage = "https://github.com/quexten/goldwarden";
94 license = licenses.mit;
95 maintainers = with maintainers; [ arthsmn justanotherariel ];
96 mainProgram = "goldwarden";
97 platforms = platforms.linux; # Support for other platforms is not yet ready, see https://github.com/quexten/goldwarden/issues/4