Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 fetchFromGitHub,
3 lib,
4 stdenvNoCC,
5}:
6
7stdenvNoCC.mkDerivation (finalAttrs: {
8 pname = "betterdiscordctl";
9 version = "2.0.1";
10
11 src = fetchFromGitHub {
12 owner = "bb010g";
13 repo = "betterdiscordctl";
14 rev = "v${finalAttrs.version}";
15 hash = "sha256-bAHO+2urgbL2LXiP0UZpvszX73PYtKbTOeLDyFwOYlw=";
16 };
17
18 postPatch = ''
19 substituteInPlace betterdiscordctl \
20 --replace-fail "DISABLE_SELF_UPGRADE=" "DISABLE_SELF_UPGRADE=yes"
21 '';
22
23 installPhase = ''
24 runHook preInstall
25
26 install -Dm 755 -t "$out/bin" -- betterdiscordctl
27 install -Dm 644 -t "$out/share/doc/betterdiscordctl" -- README.md
28
29 runHook postInstall
30 '';
31
32 doInstallCheck = true;
33
34 installCheckPhase = ''
35 runHook preInstallCheck
36
37 "$out/bin/betterdiscordctl" --version
38
39 runHook postInstallCheck
40 '';
41
42 meta = {
43 homepage = "https://github.com/bb010g/betterdiscordctl";
44 description = "Utility for managing BetterDiscord on Linux";
45 license = lib.licenses.mit;
46 mainProgram = "betterdiscordctl";
47 maintainers = [ ];
48 platforms = lib.platforms.linux;
49 };
50})