From 3e204f058955d07756b60f8ffe189099b32208ba Mon Sep 17 00:00:00 2001 From: Ivar Date: Tue, 5 May 2020 15:22:25 +0200 Subject: [PATCH] betterdiscordctl: init at 1.7.0 --- pkgs/tools/misc/betterdiscordctl/default.nix | 37 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/tools/misc/betterdiscordctl/default.nix diff --git a/pkgs/tools/misc/betterdiscordctl/default.nix b/pkgs/tools/misc/betterdiscordctl/default.nix new file mode 100644 index 000000000000..9d6159bda50e --- /dev/null +++ b/pkgs/tools/misc/betterdiscordctl/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, fetchpatch }: + +stdenv.mkDerivation rec { + pname = "betterdiscordctl"; + version = "1.7.0"; + + src = fetchFromGitHub { + owner = "bb010g"; + repo = "betterdiscordctl"; + rev = "v${version}"; + sha256 = "0qpmm5l8jhm7k0kqblc0bnr9fl4b6z8iddhjar03bb4kqgr962fa"; + }; + + patches = [ + (fetchpatch { # Required till https://github.com/bb010g/betterdiscordctl/pull/67 is merged upstream. + url = "https://github.com/bb010g/betterdiscordctl/pull/67/commits/f1c7170fc2626d9aec4d244977b5a73c401aa1d4.patch"; + sha256 = "003zqd9ljb9h674sjwjvvdfs7q4cw0p1ydg3lax132vb4vz9k0zi"; + }) + ]; + + preBuild = "sed -i 's/^nix=$/&yes/g;s/^DISABLE_UPGRADE=$/&yes/g' ./betterdiscordctl"; + + installPhase = '' + mkdir -p $out/bin + mkdir -p $out/share/doc/betterdiscordctl + install -Dm744 betterdiscordctl $out/bin/betterdiscordctl + install -Dm644 README.md $out/share/doc/betterdiscordctl/README.md + ''; + + meta = with stdenv.lib; { + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cf92cae7a6ac..08887371b459 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -756,6 +756,8 @@ in berglas = callPackage ../tools/admin/berglas/default.nix { }; + betterdiscordctl = callPackage ../tools/misc/betterdiscordctl { }; + brakeman = callPackage ../development/tools/analysis/brakeman { }; brewtarget = libsForQt5.callPackage ../applications/misc/brewtarget { } ;