diff --git a/pkgs/tools/security/buttercup-desktop/default.nix b/pkgs/tools/security/buttercup-desktop/default.nix new file mode 100644 index 000000000000..07df51e84e38 --- /dev/null +++ b/pkgs/tools/security/buttercup-desktop/default.nix @@ -0,0 +1,33 @@ +{ lib, fetchurl, appimageTools }: + +let + pname = "buttercup-desktop"; + version = "2.13.0"; + name = "${pname}-${version}"; + src = fetchurl { + url = "https://github.com/buttercup/buttercup-desktop/releases/download/v${version}/Buttercup-linux-x86_64.AppImage"; + sha256 = "sha256-JXXJZyd/fp2463WyxIB+pKcNzGUFfCouPE6iTx2lhME="; + }; + appimageContents = appimageTools.extractType2 { inherit name src; }; + +in appimageTools.wrapType2 { + inherit name src; + + extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libsecret ]; + + extraInstallCommands = '' + mv $out/bin/${name} $out/bin/buttercup-desktop + install -m 444 -D ${appimageContents}/buttercup.desktop -t $out/share/applications + substituteInPlace $out/share/applications/buttercup.desktop \ + --replace 'Exec=AppRun' 'Exec=buttercup-desktop' + 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" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index abe313969f48..447289e86729 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2108,6 +2108,8 @@ with pkgs; butane = callPackage ../development/tools/butane { }; + buttercup-desktop = callPackage ../tools/security/buttercup-desktop { }; + charles = charles4; inherit (callPackage ../applications/networking/charles {}) charles3