depot/third_party/nixpkgs/pkgs/tools/security/buttercup-desktop/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

32 lines
1.1 KiB
Nix

{ lib, fetchurl, appimageTools }:
let
pname = "buttercup-desktop";
version = "2.16.0";
src = fetchurl {
url = "https://github.com/buttercup/buttercup-desktop/releases/download/v${version}/Buttercup-linux-x86_64.AppImage";
sha256 = "sha256-o6KdbwD0VdCTYLEfar7Jt7MRZUayGHyasnmtU8Cqg3E=";
};
appimageContents = appimageTools.extractType2 { inherit pname src version; };
in appimageTools.wrapType2 {
inherit pname src version;
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libsecret ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/buttercup.desktop -t $out/share/applications
substituteInPlace $out/share/applications/buttercup.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
meta = with lib; {
description = "Cross-Platform Passwords & Secrets Vault";
homepage = "https://buttercup.pw";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
platforms = [ "x86_64-linux" ];
};
}