2017-07-16 12:41:35 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper
|
2018-07-21 01:44:44 +01:00
|
|
|
, curl, python, bind, iproute, bc, gitMinimal }:
|
2017-07-16 12:41:35 +01:00
|
|
|
let
|
2020-01-17 04:46:52 +00:00
|
|
|
version = "1.23.0";
|
2017-07-16 12:41:35 +01:00
|
|
|
deps = lib.makeBinPath [
|
|
|
|
curl
|
|
|
|
python
|
|
|
|
bind.dnsutils
|
|
|
|
iproute
|
|
|
|
bc
|
|
|
|
gitMinimal
|
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "bashSnippets";
|
|
|
|
inherit version;
|
2017-07-16 12:41:35 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexanderepstein";
|
|
|
|
repo = "Bash-Snippets";
|
|
|
|
rev = "v${version}";
|
2020-01-17 04:46:52 +00:00
|
|
|
sha256 = "044nxgd3ic2qr6hgq5nymn3dyf5i4s8mv5z4az6jvwlrjnvbg8cp";
|
2017-07-16 12:41:35 +01:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-07-16 12:41:35 +01:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs install.sh
|
|
|
|
substituteInPlace install.sh --replace /usr/local "$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-08-03 03:25:11 +01:00
|
|
|
mkdir -p "$out"/bin "$out"/share/man/man1
|
2017-07-16 12:41:35 +01: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";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/alexanderepstein/Bash-Snippets";
|
2017-07-16 12:41:35 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ infinisil ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|