nixpkgs/pkgs/tools/misc/betterdiscordctl/default.nix

43 lines
1.0 KiB
Nix
Raw Normal View History

2021-07-12 02:41:26 +00:00
{ lib, stdenvNoCC, fetchFromGitHub }:
2020-05-05 13:22:25 +00:00
2021-07-12 02:41:26 +00:00
stdenvNoCC.mkDerivation rec {
2020-05-05 13:22:25 +00:00
pname = "betterdiscordctl";
2021-07-12 02:41:26 +00:00
version = "2.0.1";
2020-05-05 13:22:25 +00:00
src = fetchFromGitHub {
owner = "bb010g";
repo = "betterdiscordctl";
rev = "v${version}";
2021-07-12 02:41:26 +00:00
sha256 = "0p321rfcihz2779sdd6qfgpxgk5yd53d33vq5pvb50dbdgxww0bc";
2020-05-05 13:22:25 +00:00
};
2021-05-23 23:08:46 +00:00
postPatch = ''
substituteInPlace betterdiscordctl \
--replace "DISABLE_SELF_UPGRADE=" "DISABLE_SELF_UPGRADE=yes"
'';
2020-05-05 13:22:25 +00:00
installPhase = ''
2021-05-23 23:08:46 +00:00
runHook preInstall
mkdir -p "$out/bin" "$out/share/doc/betterdiscordctl"
2020-05-05 13:22:25 +00:00
install -Dm744 betterdiscordctl $out/bin/betterdiscordctl
install -Dm644 README.md $out/share/doc/betterdiscordctl/README.md
2021-05-23 23:08:46 +00:00
runHook postInstall
2020-05-05 13:22:25 +00:00
'';
2021-07-12 02:41:26 +00:00
doInstallCheck = true;
installCheckPhase = ''
$out/bin/betterdiscordctl --version
'';
meta = with lib; {
2020-05-05 13:22:25 +00:00
homepage = "https://github.com/bb010g/betterdiscordctl";
description = "A utility for managing BetterDiscord on Linux";
license = licenses.mit;
maintainers = with maintainers; [ ivar bb010g ];
platforms = platforms.linux;
};
}