2021-07-12 03:41:26 +01:00
|
|
|
{ lib, stdenvNoCC, fetchFromGitHub }:
|
2020-05-05 14:22:25 +01:00
|
|
|
|
2021-07-12 03:41:26 +01:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2020-05-05 14:22:25 +01:00
|
|
|
pname = "betterdiscordctl";
|
2021-07-12 03:41:26 +01:00
|
|
|
version = "2.0.1";
|
2020-05-05 14:22:25 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bb010g";
|
|
|
|
repo = "betterdiscordctl";
|
|
|
|
rev = "v${version}";
|
2021-07-12 03:41:26 +01:00
|
|
|
sha256 = "0p321rfcihz2779sdd6qfgpxgk5yd53d33vq5pvb50dbdgxww0bc";
|
2020-05-05 14:22:25 +01:00
|
|
|
};
|
|
|
|
|
2021-05-24 00:08:46 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace betterdiscordctl \
|
|
|
|
--replace "DISABLE_SELF_UPGRADE=" "DISABLE_SELF_UPGRADE=yes"
|
|
|
|
'';
|
2020-05-05 14:22:25 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-24 00:08:46 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p "$out/bin" "$out/share/doc/betterdiscordctl"
|
2020-05-05 14:22:25 +01:00
|
|
|
install -Dm744 betterdiscordctl $out/bin/betterdiscordctl
|
|
|
|
install -Dm644 README.md $out/share/doc/betterdiscordctl/README.md
|
2021-05-24 00:08:46 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-05-05 14:22:25 +01:00
|
|
|
'';
|
|
|
|
|
2021-07-12 03:41:26 +01:00
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/betterdiscordctl --version
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-05-05 14:22:25 +01: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;
|
|
|
|
};
|
|
|
|
}
|