mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 03:12:51 +00:00
1password-gui-beta: add at 8.7.0-49
This commit is contained in:
parent
1ffba9f2f6
commit
d09887119f
132
pkgs/applications/misc/1password-gui/beta.nix
Normal file
132
pkgs/applications/misc/1password-gui/beta.nix
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchurl
|
||||||
|
, makeWrapper
|
||||||
|
, alsa-lib
|
||||||
|
, 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
|
||||||
|
, udev
|
||||||
|
, xdg-utils
|
||||||
|
|
||||||
|
# The 1Password polkit file requires a list of users for whom polkit
|
||||||
|
# integrations should be enabled. This should be a list of strings that
|
||||||
|
# correspond to usernames.
|
||||||
|
, polkitPolicyOwners ? []
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
# Convert the polkitPolicyOwners variable to a polkit-compatible string for the polkit file.
|
||||||
|
policyOwners = lib.concatStringsSep " " (map (user: "unix-user:${user}") polkitPolicyOwners);
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
pname = "1password";
|
||||||
|
version = "8.7.0-49.BETA";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://downloads.1password.com/linux/tar/beta/x86_64/1password-${version}.x64.tar.gz";
|
||||||
|
sha256 = "sha256-cYT9Pi2WEjZQ5P7Dr84l65AHyD8tZrYC+m4hFxSsNd4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
dontBuild = true;
|
||||||
|
dontPatchELF = true;
|
||||||
|
|
||||||
|
installPhase =
|
||||||
|
let rpath = lib.makeLibraryPath [
|
||||||
|
alsa-lib
|
||||||
|
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
|
||||||
|
] + ":${stdenv.cc.cc.lib}/lib64";
|
||||||
|
in ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/bin $out/share/1password
|
||||||
|
cp -a * $out/share/1password
|
||||||
|
|
||||||
|
# Desktop file
|
||||||
|
install -Dt $out/share/applications resources/${pname}.desktop
|
||||||
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||||
|
--replace 'Exec=/opt/1Password/${pname}' 'Exec=${pname}'
|
||||||
|
|
||||||
|
'' + (lib.optionalString (polkitPolicyOwners != [ ])
|
||||||
|
''
|
||||||
|
# Polkit file
|
||||||
|
mkdir -p $out/share/polkit-1/actions
|
||||||
|
substitute com.1password.1Password.policy.tpl $out/share/polkit-1/actions/com.1password.1Password.policy --replace "\''${POLICY_OWNERS}" "${policyOwners}"
|
||||||
|
'') + ''
|
||||||
|
|
||||||
|
# Icons
|
||||||
|
cp -a resources/icons $out/share
|
||||||
|
|
||||||
|
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||||
|
patchelf --set-interpreter $interp $out/share/1password/{1password,1Password-BrowserSupport,1Password-KeyringHelper}
|
||||||
|
patchelf --set-rpath ${rpath}:$out/share/1password $out/share/1password/{1password,1Password-BrowserSupport,1Password-KeyringHelper}
|
||||||
|
for file in $(find $out -type f -name \*.so\* ); do
|
||||||
|
patchelf --set-rpath ${rpath}:$out/share/1password $file
|
||||||
|
done
|
||||||
|
|
||||||
|
# Electron is trying to open udev via dlopen()
|
||||||
|
# and for some reason that doesn't seem to be impacted from the rpath.
|
||||||
|
# Adding udev to LD_LIBRARY_PATH fixes that.
|
||||||
|
makeWrapper $out/share/1password/1password $out/bin/1password \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
||||||
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Multi-platform password manager";
|
||||||
|
homepage = "https://1password.com/";
|
||||||
|
license = licenses.unfree;
|
||||||
|
maintainers = with maintainers; [ timstott savannidgerinel maxeaubrey sebtm ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
@ -128,7 +128,7 @@ in stdenv.mkDerivation rec {
|
|||||||
description = "Multi-platform password manager";
|
description = "Multi-platform password manager";
|
||||||
homepage = "https://1password.com/";
|
homepage = "https://1password.com/";
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
maintainers = with maintainers; [ timstott savannidgerinel maxeaubrey ];
|
maintainers = with maintainers; [ timstott savannidgerinel maxeaubrey sebtm ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -917,6 +917,8 @@ with pkgs;
|
|||||||
|
|
||||||
_1password-gui = callPackage ../applications/misc/1password-gui { };
|
_1password-gui = callPackage ../applications/misc/1password-gui { };
|
||||||
|
|
||||||
|
_1password-gui-beta = callPackage ../applications/misc/1password-gui/beta.nix { };
|
||||||
|
|
||||||
_6tunnel = callPackage ../tools/networking/6tunnel { };
|
_6tunnel = callPackage ../tools/networking/6tunnel { };
|
||||||
|
|
||||||
_7zz = callPackage ../tools/archivers/7zz { };
|
_7zz = callPackage ../tools/archivers/7zz { };
|
||||||
|
Loading…
Reference in New Issue
Block a user