From 8daf0cedeec8ddb1e28a3faec45815c1a3caeeea Mon Sep 17 00:00:00 2001 From: Ivar <41924494+IvarWithoutBones@users.noreply.github.com> Date: Wed, 7 Apr 2021 09:59:54 +0200 Subject: [PATCH] betterdiscord-installer: init at 1.0.0-beta (#118471) --- .../misc/betterdiscord-installer/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/misc/betterdiscord-installer/default.nix diff --git a/pkgs/tools/misc/betterdiscord-installer/default.nix b/pkgs/tools/misc/betterdiscord-installer/default.nix new file mode 100644 index 000000000000..d74a914ba65c --- /dev/null +++ b/pkgs/tools/misc/betterdiscord-installer/default.nix @@ -0,0 +1,32 @@ +{ appimageTools, lib, fetchurl }: +let + pname = "betterdiscord-installer"; + version = "1.0.0-beta"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/BetterDiscord/Installer/releases/download/v${version}/Betterdiscord-Linux.AppImage"; + sha256 = "103acb11qmvjmf6g9lgsfm5jyahfwfdqw0x9w6lmv1hzwbs26dsr"; + }; + + appimageContents = appimageTools.extract { inherit name src; }; +in appimageTools.wrapType2 { + inherit name src; + + extraInstallCommands = '' + mv $out/bin/${name} $out/bin/${pname} + + install -m 444 -D ${appimageContents}/betterdiscord.desktop -t $out/share/applications + substituteInPlace $out/share/applications/betterdiscord.desktop \ + --replace "Exec=AppRun" "Exec=$out/bin/${pname}" + cp -r ${appimageContents}/usr/share/icons $out/share + ''; + + meta = with lib; { + description = "Installer for BetterDiscord"; + homepage = "https://betterdiscord.net"; + license = licenses.mit; + maintainers = [ maintainers.ivar ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be33face35c1..b5e91cceadce 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1102,6 +1102,8 @@ in betterdiscordctl = callPackage ../tools/misc/betterdiscordctl { }; + betterdiscord-installer = callPackage ../tools/misc/betterdiscord-installer { }; + brakeman = callPackage ../development/tools/analysis/brakeman { }; brewtarget = libsForQt514.callPackage ../applications/misc/brewtarget { } ;