2021-12-06 16:07:01 +00:00
|
|
|
{ lib, fetchurl, appimageTools }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "buttercup-desktop";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.26.3";
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/buttercup/buttercup-desktop/releases/download/v${version}/Buttercup-linux-x86_64.AppImage";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-jX8U+DcuoYGfxQgYOIn03Vg/OesMVLHZ1gbGBSlgIbI=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
appimageContents = appimageTools.extractType2 { inherit pname src version; };
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
in appimageTools.wrapType2 {
|
2022-08-12 12:06:08 +00:00
|
|
|
inherit pname src version;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libsecret ];
|
|
|
|
|
|
|
|
extraInstallCommands = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
mv $out/bin/${pname}-${version} $out/bin/${pname}
|
2021-12-06 16:07:01 +00:00
|
|
|
install -m 444 -D ${appimageContents}/buttercup.desktop -t $out/share/applications
|
|
|
|
substituteInPlace $out/share/applications/buttercup.desktop \
|
2022-08-12 12:06:08 +00:00
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
2021-12-06 16:07:01 +00:00
|
|
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Cross-Platform Passwords & Secrets Vault";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "buttercup-desktop";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://buttercup.pw";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|