2020-08-08 09:06:45 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, appimageTools
|
|
|
|
, makeWrapper
|
2020-09-01 17:20:39 +02:00
|
|
|
, electron_9
|
2020-08-08 09:06:45 +02:00
|
|
|
, openssl
|
|
|
|
}:
|
|
|
|
|
2020-09-01 17:20:39 +02:00
|
|
|
let
|
|
|
|
electron = electron_9;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2020-08-08 09:06:45 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "1password";
|
2020-11-27 09:20:42 +01:00
|
|
|
version = "0.9.5-2";
|
2020-08-08 09:06:45 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://onepassword.s3.amazonaws.com/linux/appimage/${pname}-${version}.AppImage";
|
2020-11-27 09:20:42 +01:00
|
|
|
sha256 = "1fj8gab5frxnzx6cafkcxmic9z1wvfqi4v511wsg9dy4mn5dc6qw";
|
2020-08-08 09:06:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
appimageContents = appimageTools.extractType2 {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
inherit src;
|
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = let
|
|
|
|
runtimeLibs = [
|
|
|
|
openssl.out
|
|
|
|
stdenv.cc.cc
|
|
|
|
];
|
|
|
|
in ''
|
|
|
|
mkdir -p $out/bin $out/share/1password
|
|
|
|
|
|
|
|
# Applications files.
|
|
|
|
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
|
|
|
|
|
|
|
|
# Desktop file.
|
|
|
|
install -Dt $out/share/applications ${appimageContents}/${pname}.desktop
|
|
|
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
|
|
|
|
|
|
# Icons.
|
|
|
|
cp -a ${appimageContents}/usr/share/icons $out/share
|
|
|
|
|
|
|
|
# Wrap the application with Electron.
|
|
|
|
makeWrapper "${electron}/bin/electron" "$out/bin/${pname}" \
|
|
|
|
--add-flags "$out/share/${pname}/resources/app.asar" \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath runtimeLibs}"
|
|
|
|
'';
|
|
|
|
|
2020-08-25 20:25:23 +02:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2020-08-08 09:06:45 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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/";
|
|
|
|
license = licenses.unfree;
|
2020-10-27 09:49:45 +01:00
|
|
|
maintainers = with maintainers; [ danieldk timstott ];
|
2020-08-08 09:06:45 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|