uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
50
pkgs/tools/networking/slack-cli/default.nix
Normal file
50
pkgs/tools/networking/slack-cli/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# slack-cli must be configured using the SLACK_CLI_TOKEN environment variable.
|
||||
# Using `slack init` will not work because it tries to write to the Nix store.
|
||||
#
|
||||
# There is no reason that we couldn't change the file path that slack-cli uses
|
||||
# for token storage, except that it would make the Nix package inconsistent with
|
||||
# upstream and other distributions.
|
||||
|
||||
{ stdenv, lib, fetchFromGitHub, curl, jq, coreutils, gnugrep, gnused
|
||||
, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "slack-cli";
|
||||
version = "0.18.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rockymadden";
|
||||
repo = "slack-cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "022yr3cpfg0v7cxi62zzk08vp0l3w851qpfh6amyfgjiynnfyddl";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
cp src/slack "$out/bin/.slack-wrapped"
|
||||
|
||||
cat <<-WRAPPER > "$out/bin/slack"
|
||||
#!${runtimeShell}
|
||||
[ "\$1" = "init" -a -z "\$SLACK_CLI_TOKEN" ] && cat <<-'MESSAGE' >&2
|
||||
WARNING: slack-cli must be configured using the SLACK_CLI_TOKEN
|
||||
environment variable. Using \`slack init\` will not work because it tries
|
||||
to write to the Nix store.
|
||||
|
||||
MESSAGE
|
||||
|
||||
export PATH=${lib.makeBinPath [ curl jq coreutils gnugrep gnused ]}:"\$PATH"
|
||||
exec "$out/bin/.slack-wrapped" "\$@"
|
||||
WRAPPER
|
||||
|
||||
chmod +x "$out/bin/slack"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.qyliss ];
|
||||
mainProgram = "slack";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue