Skip to content

Instantly share code, notes, and snippets.

@boomshroom
Last active June 7, 2017 03:44
Show Gist options
  • Save boomshroom/2f9b896e93992dde393c1f7091a56adf to your computer and use it in GitHub Desktop.
Save boomshroom/2f9b896e93992dde393c1f7091a56adf to your computer and use it in GitHub Desktop.
self: super:
let stdenv = self.stdenv;
in
{
nix-package-search = stdenv.mkDerivation {
name = "nq";
version = "0.1";
src = self.fetchurl {
url = "https://gist.githubusercontent.com/olejorgenb/0c3bafa3c7b63d1a2f83ee13582de7b9/raw/4afaa1a572ac576519dc6e4cc42377d41d7c2722/nix-package-search";
sha256 = "0jhip8ph04qmnii5w8d8rra8wcbdvryn9f452v17xxj5x98a9416";
};
nativeBuildInputs = [ super.pkgs.makeWrapper ];
phases = [ "installPhase" "fixupPhase" ];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/nq
chmod +x $out/bin/nq
wrapProgram $out/bin/nq --prefix PATH : ${super.lib.makeBinPath [ self.pkgs.jq ]}
'';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment