2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper
|
2021-04-05 15:23:46 +00:00
|
|
|
, curl, python3, bind, iproute2, bc, gitMinimal }:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
|
|
|
version = "1.23.0";
|
|
|
|
deps = lib.makeBinPath [
|
|
|
|
curl
|
2021-03-20 04:20:00 +00:00
|
|
|
python3
|
2020-04-24 23:36:52 +00:00
|
|
|
bind.dnsutils
|
2021-04-05 15:23:46 +00:00
|
|
|
iproute2
|
2020-04-24 23:36:52 +00:00
|
|
|
bc
|
|
|
|
gitMinimal
|
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "bashSnippets";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexanderepstein";
|
|
|
|
repo = "Bash-Snippets";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "044nxgd3ic2qr6hgq5nymn3dyf5i4s8mv5z4az6jvwlrjnvbg8cp";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
patchShebangs install.sh
|
|
|
|
substituteInPlace install.sh --replace /usr/local "$out"
|
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/bin "$out"/share/man/man1
|
|
|
|
./install.sh all
|
|
|
|
for file in "$out"/bin/*; do
|
|
|
|
wrapProgram "$file" --prefix PATH : "${deps}"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Collection of small bash scripts for heavy terminal users";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/alexanderepstein/Bash-Snippets";
|
|
|
|
license = licenses.mit;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|