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

37 lines
961 B
Nix
Raw Normal View History

2021-04-02 22:35:33 +02:00
{ lib, stdenv, fetchFromGitHub }:
2020-05-05 15:22:25 +02:00
stdenv.mkDerivation rec {
pname = "betterdiscordctl";
2021-05-24 01:08:46 +02:00
version = "2.0.0";
2020-05-05 15:22:25 +02:00
src = fetchFromGitHub {
owner = "bb010g";
repo = "betterdiscordctl";
rev = "v${version}";
2021-05-24 01:08:46 +02:00
sha256 = "1wys3wbcz5hq8275ia2887kr5fzz4b3gkcp56667j9k0p3k3zfac";
2020-05-05 15:22:25 +02:00
};
2021-05-24 01:08:46 +02:00
postPatch = ''
substituteInPlace betterdiscordctl \
--replace "DISABLE_SELF_UPGRADE=" "DISABLE_SELF_UPGRADE=yes"
'';
2020-05-05 15:22:25 +02:00
installPhase = ''
2021-05-24 01:08:46 +02:00
runHook preInstall
mkdir -p "$out/bin" "$out/share/doc/betterdiscordctl"
2020-05-05 15:22:25 +02:00
install -Dm744 betterdiscordctl $out/bin/betterdiscordctl
install -Dm644 README.md $out/share/doc/betterdiscordctl/README.md
2021-05-24 01:08:46 +02:00
runHook postInstall
2020-05-05 15:22:25 +02:00
'';
meta = with lib; {
2020-05-05 15:22:25 +02: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;
};
}