git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #123515 from savannidgerinel/savanni/1password-8.0.34-stable

_1password-gui: 8.0.33-53.BETA -> 8.0.34-stable

commitd10236eb20163b9a5871a45bada37886b2bc1d39 authorDaniël de Kok <me@danieldk.eu> dateFri 21 May 2021, 08:31 (5 years ago) parenteb20269720de41
1 file changed+81−45
pkgs/applications/misc/1password-gui/default.nix+81−45
pkgs/applications/misc/1password-gui/default.nix+81−45
@@ -2,76 +2,112 @@
22, stdenv
33, fetchurl
44, makeWrapper
5−, electron_11
6−, openssl
5+, alsaLib
6+, at-spi2-atk
7+, at-spi2-core
8+, atk
9+, cairo
10+, cups
11+, dbus
12+, expat
13+, gdk-pixbuf
14+, glib
15+, gtk3
16+, libX11
17+, libXcomposite
18+, libXdamage
19+, libXext
20+, libXfixes
21+, libXrandr
22+, libdrm
23+, libxcb
24+, libxkbcommon
25+, libxshmfence
26+, mesa
27+, nspr
28+, nss
29+, pango
30+, systemd
31+, xdg-utils
732}:
8−
933stdenv.mkDerivation rec {
1034 pname = "1password";
11− version = "8.0.33-53.BETA";
35+ version = "8.0.34";
1236
1337 src = fetchurl {
14− url = "https://downloads.1password.com/linux/tar/beta/x86_64/1password-${version}.x64.tar.gz";
15− hash = "sha256-YUYER+UiM1QEDgGl0P9bIT65YVacUnuGtQVkV91teEU=";
38+ url = "https://downloads.1password.com/linux/tar/stable/x86_64/1password-${version}.x64.tar.gz";
39+ sha256 = "0mp119v5vgsva7pnxpsbq4xhh4vbhwv7ga9b5b7f6slx3biy1wmh";
1640 };
1741
1842 nativeBuildInputs = [ makeWrapper ];
1943
2044 dontConfigure = true;
2145 dontBuild = true;
46+ dontPatchELF = true;
2247
23− installPhase = let
24− runtimeLibs = [
25− openssl.out
26− stdenv.cc.cc
27− ];
28− in ''
29− mkdir -p $out/bin $out/share/1password
30−
31− # Applications files.
32− cp -a {locales,resources} $out/share/${pname}
33− install -Dm0755 -t $out/share/${pname} {1Password-BrowserSupport,1Password-KeyringHelper}
48+ installPhase =
49+ let rpath = lib.makeLibraryPath [
50+ alsaLib
51+ at-spi2-atk
52+ at-spi2-core
53+ atk
54+ cairo
55+ cups
56+ dbus
57+ expat
58+ gdk-pixbuf
59+ glib
60+ gtk3
61+ libX11
62+ libXcomposite
63+ libXdamage
64+ libXext
65+ libXfixes
66+ libXrandr
67+ libdrm
68+ libxcb
69+ libxkbcommon
70+ libxshmfence
71+ mesa
72+ nspr
73+ nss
74+ pango
75+ systemd
76+ ] + ":${stdenv.cc.cc.lib}/lib64";
77+ in ''
78+ runHook preInstall
3479
35− # Desktop file.
36− install -Dt $out/share/applications resources/${pname}.desktop
37− substituteInPlace $out/share/applications/${pname}.desktop \
38− --replace 'Exec=/opt/1Password/${pname}' 'Exec=${pname}'
80+ mkdir -p $out/bin $out/share/1password
81+ cp -a * $out/share/1password
3982
40− # Icons.
41− cp -a resources/icons $out/share
83+ # Desktop file
84+ install -Dt $out/share/applications resources/${pname}.desktop
85+ substituteInPlace $out/share/applications/${pname}.desktop \
86+ --replace 'Exec=/opt/1Password/${pname}' 'Exec=${pname}'
4287
43− # Wrap the application with Electron.
44− makeWrapper "${electron_11}/bin/electron" "$out/bin/${pname}" \
45− --add-flags "$out/share/${pname}/resources/app.asar" \
46− --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}"
88+ # Icons
89+ cp -a resources/icons $out/share
4790
48− # Set the interpreter for the helper binaries and wrap them with
49− # the runtime libraries.
50− interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
51− patchelf --set-interpreter $interp \
52− $out/share/$pname/{1Password-BrowserSupport,1Password-KeyringHelper}
91+ interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
92+ patchelf --set-interpreter $interp $out/share/1password/{1password,1Password-BrowserSupport,1Password-KeyringHelper}
93+ patchelf --set-rpath ${rpath}:$out/share/1password $out/share/1password/{1password,1Password-BrowserSupport,1Password-KeyringHelper}
94+ for file in $(find $out -type f -name \*.so\* ); do
95+ patchelf --set-rpath ${rpath}:$out/share/1password $file
96+ done
5397
54− wrapProgram $out/share/${pname}/1Password-BrowserSupport \
55− --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}"
98+ makeWrapper $out/share/1password/1password $out/bin/1password \
99+ --prefix PATH : ${xdg-utils}/bin
56100
57− wrapProgram $out/share/${pname}/1Password-KeyringHelper \
58− --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}"
59− '';
101+ runHook postInstall
102+ '';
60103
61104 passthru.updateScript = ./update.sh;
62105
63106 meta = with lib; {
64107 description = "Multi-platform password manager";
65− longDescription = ''
66− 1Password is a multi-platform package manager.
67−
68− The Linux version is currently a development preview and can
69− only be used to search, view, and copy items. However items
70− cannot be created or edited.
71− '';
72108 homepage = "https://1password.com/";
73109 license = licenses.unfree;
74− maintainers = with maintainers; [ danieldk timstott ];
110+ maintainers = with maintainers; [ danieldk timstott savannidgerinel ];
75111 platforms = [ "x86_64-linux" ];
76112 };
77113}