Files
quantenzitrone 92223bf34a bash-snippets: refactor and rename from bashSnippets
The upstream repo name is Bash-Snippets,
so the package name is the lowercase of that.
2026-02-10 16:50:45 +01:00

61 lines
1.1 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
makeWrapper,
curl,
python3,
bind,
iproute2,
bc,
gitMinimal,
}:
let
deps = lib.makeBinPath [
curl
python3
bind.dnsutils
iproute2
bc
gitMinimal
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "bash-snippets";
version = "1.23.0";
src = fetchFromGitHub {
owner = "alexanderepstein";
repo = "Bash-Snippets";
rev = "v${finalAttrs.version}";
sha256 = "044nxgd3ic2qr6hgq5nymn3dyf5i4s8mv5z4az6jvwlrjnvbg8cp";
};
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
patchShebangs install.sh
substituteInPlace install.sh --replace /usr/local "$out"
'';
strictDeps = true;
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 = {
description = "Collection of small bash scripts for heavy terminal users";
homepage = "https://github.com/alexanderepstein/Bash-Snippets";
license = lib.licenses.mit;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})