depot/third_party/nixpkgs/pkgs/applications/misc/bashSnippets/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

51 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitHub, makeWrapper
, curl, python3, bind, iproute2, bc, gitMinimal }:
let
version = "1.23.0";
deps = lib.makeBinPath [
curl
python3
bind.dnsutils
iproute2
bc
gitMinimal
];
in
stdenv.mkDerivation {
pname = "bashSnippets";
inherit version;
src = fetchFromGitHub {
owner = "alexanderepstein";
repo = "Bash-Snippets";
rev = "v${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 = with lib; {
description = "Collection of small bash scripts for heavy terminal users";
homepage = "https://github.com/alexanderepstein/Bash-Snippets";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
};
}