Skip to content

Instantly share code, notes, and snippets.

@ar1a

ar1a/default.nix Secret

Last active January 20, 2019 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ar1a/7586cc7ae7e7bb4f1b0a90f99a426d99 to your computer and use it in GitHub Desktop.
Save ar1a/7586cc7ae7e7bb4f1b0a90f99a426d99 to your computer and use it in GitHub Desktop.
{ stdenv, pkgs, jq, curl, fetchFromGitHub, makeWrapper }:
stdenv.mkDerivation rec {
name = "pb_cli-${version}";
version = "1.0";
src = fetchFromGitHub {
owner = "ptpb";
repo = "pb_cli";
rev = "5242382b3d6b5c0ddaf6e4843a69746b40866e57";
sha256 = "0543x3377apinhxnsfq82zlp5sm8g1bf6hmsvvcwra5rsshv2ybk";
};
buildInputs = [ makeWrapper ];
installPhase = ''
install -Dm755 src/pb.sh $out/bin/pb
patchShebangs $out/bin/pb
wrapProgram $out/bin/pb \
--prefix PATH : '${stdenv.lib.makeBinPath [ jq curl ]}'
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment