Merge pull request #123515 from savannidgerinel/savanni/1password-8.0.34-stable
_1password-gui: 8.0.33-53.BETA -> 8.0.34-stable
This commit is contained in:
commit
d10236eb20
@ -2,76 +2,112 @@
|
|||||||
, stdenv
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, electron_11
|
, alsaLib
|
||||||
, openssl
|
, at-spi2-atk
|
||||||
|
, at-spi2-core
|
||||||
|
, atk
|
||||||
|
, cairo
|
||||||
|
, cups
|
||||||
|
, dbus
|
||||||
|
, expat
|
||||||
|
, gdk-pixbuf
|
||||||
|
, glib
|
||||||
|
, gtk3
|
||||||
|
, libX11
|
||||||
|
, libXcomposite
|
||||||
|
, libXdamage
|
||||||
|
, libXext
|
||||||
|
, libXfixes
|
||||||
|
, libXrandr
|
||||||
|
, libdrm
|
||||||
|
, libxcb
|
||||||
|
, libxkbcommon
|
||||||
|
, libxshmfence
|
||||||
|
, mesa
|
||||||
|
, nspr
|
||||||
|
, nss
|
||||||
|
, pango
|
||||||
|
, systemd
|
||||||
|
, xdg-utils
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "1password";
|
pname = "1password";
|
||||||
version = "8.0.33-53.BETA";
|
version = "8.0.34";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://downloads.1password.com/linux/tar/beta/x86_64/1password-${version}.x64.tar.gz";
|
url = "https://downloads.1password.com/linux/tar/stable/x86_64/1password-${version}.x64.tar.gz";
|
||||||
hash = "sha256-YUYER+UiM1QEDgGl0P9bIT65YVacUnuGtQVkV91teEU=";
|
sha256 = "0mp119v5vgsva7pnxpsbq4xhh4vbhwv7ga9b5b7f6slx3biy1wmh";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
dontPatchELF = true;
|
||||||
|
|
||||||
installPhase = let
|
installPhase =
|
||||||
runtimeLibs = [
|
let rpath = lib.makeLibraryPath [
|
||||||
openssl.out
|
alsaLib
|
||||||
stdenv.cc.cc
|
at-spi2-atk
|
||||||
];
|
at-spi2-core
|
||||||
in ''
|
atk
|
||||||
mkdir -p $out/bin $out/share/1password
|
cairo
|
||||||
|
cups
|
||||||
|
dbus
|
||||||
|
expat
|
||||||
|
gdk-pixbuf
|
||||||
|
glib
|
||||||
|
gtk3
|
||||||
|
libX11
|
||||||
|
libXcomposite
|
||||||
|
libXdamage
|
||||||
|
libXext
|
||||||
|
libXfixes
|
||||||
|
libXrandr
|
||||||
|
libdrm
|
||||||
|
libxcb
|
||||||
|
libxkbcommon
|
||||||
|
libxshmfence
|
||||||
|
mesa
|
||||||
|
nspr
|
||||||
|
nss
|
||||||
|
pango
|
||||||
|
systemd
|
||||||
|
] + ":${stdenv.cc.cc.lib}/lib64";
|
||||||
|
in ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
# Applications files.
|
mkdir -p $out/bin $out/share/1password
|
||||||
cp -a {locales,resources} $out/share/${pname}
|
cp -a * $out/share/1password
|
||||||
install -Dm0755 -t $out/share/${pname} {1Password-BrowserSupport,1Password-KeyringHelper}
|
|
||||||
|
|
||||||
# Desktop file.
|
# Desktop file
|
||||||
install -Dt $out/share/applications resources/${pname}.desktop
|
install -Dt $out/share/applications resources/${pname}.desktop
|
||||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||||
--replace 'Exec=/opt/1Password/${pname}' 'Exec=${pname}'
|
--replace 'Exec=/opt/1Password/${pname}' 'Exec=${pname}'
|
||||||
|
|
||||||
# Icons.
|
# Icons
|
||||||
cp -a resources/icons $out/share
|
cp -a resources/icons $out/share
|
||||||
|
|
||||||
# Wrap the application with Electron.
|
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||||
makeWrapper "${electron_11}/bin/electron" "$out/bin/${pname}" \
|
patchelf --set-interpreter $interp $out/share/1password/{1password,1Password-BrowserSupport,1Password-KeyringHelper}
|
||||||
--add-flags "$out/share/${pname}/resources/app.asar" \
|
patchelf --set-rpath ${rpath}:$out/share/1password $out/share/1password/{1password,1Password-BrowserSupport,1Password-KeyringHelper}
|
||||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}"
|
for file in $(find $out -type f -name \*.so\* ); do
|
||||||
|
patchelf --set-rpath ${rpath}:$out/share/1password $file
|
||||||
|
done
|
||||||
|
|
||||||
# Set the interpreter for the helper binaries and wrap them with
|
makeWrapper $out/share/1password/1password $out/bin/1password \
|
||||||
# the runtime libraries.
|
--prefix PATH : ${xdg-utils}/bin
|
||||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
|
||||||
patchelf --set-interpreter $interp \
|
|
||||||
$out/share/$pname/{1Password-BrowserSupport,1Password-KeyringHelper}
|
|
||||||
|
|
||||||
wrapProgram $out/share/${pname}/1Password-BrowserSupport \
|
runHook postInstall
|
||||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}"
|
'';
|
||||||
|
|
||||||
wrapProgram $out/share/${pname}/1Password-KeyringHelper \
|
|
||||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.updateScript = ./update.sh;
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Multi-platform password manager";
|
description = "Multi-platform password manager";
|
||||||
longDescription = ''
|
|
||||||
1Password is a multi-platform package manager.
|
|
||||||
|
|
||||||
The Linux version is currently a development preview and can
|
|
||||||
only be used to search, view, and copy items. However items
|
|
||||||
cannot be created or edited.
|
|
||||||
'';
|
|
||||||
homepage = "https://1password.com/";
|
homepage = "https://1password.com/";
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
maintainers = with maintainers; [ danieldk timstott ];
|
maintainers = with maintainers; [ danieldk timstott savannidgerinel ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user