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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.1 KiB
Nix
Raw Normal View History

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