nixpkgs-suyu/pkgs/applications/misc/bashSnippets/default.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

2017-07-16 13:41:35 +02:00
{ stdenv, lib, fetchFromGitHub, makeWrapper
2017-08-03 04:25:11 +02:00
, curl, netcat, python, bind, iproute, bc, gitMinimal }:
2017-07-16 13:41:35 +02:00
let
2017-08-03 04:25:11 +02:00
version = "1.17.3";
2017-07-16 13:41:35 +02:00
deps = lib.makeBinPath [
curl
python
bind.dnsutils
iproute
bc
gitMinimal
];
in
stdenv.mkDerivation {
name = "bashSnippets-${version}";
src = fetchFromGitHub {
owner = "alexanderepstein";
repo = "Bash-Snippets";
rev = "v${version}";
2017-08-03 04:25:11 +02:00
sha256 = "1xdjk8bjh7l6h7gdqrra1dh4wdq89wmd0jsirsvqa3bmcsb2wz1r";
2017-07-16 13:41:35 +02:00
};
buildInputs = [ makeWrapper ];
patchPhase = ''
patchShebangs install.sh
substituteInPlace install.sh --replace /usr/local "$out"
'';
dontBuild = true;
installPhase = ''
2017-08-03 04:25:11 +02:00
mkdir -p "$out"/bin "$out"/share/man/man1
2017-07-16 13:41:35 +02:00
./install.sh all
for file in "$out"/bin/*; do
wrapProgram "$file" --prefix PATH : "${deps}"
done
'';
meta = with lib; {
description = "A collection of small bash scripts for heavy terminal users";
homepage = https://github.com/alexanderepstein/Bash-Snippets;
license = licenses.mit;
maintainers = with maintainers; [ infinisil ];
platforms = platforms.unix;
};
}