Skip to content

Instantly share code, notes, and snippets.

@nicflores
Created February 20, 2018 21:14
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 nicflores/b3cc104f202b0a688409896b79281fb1 to your computer and use it in GitHub Desktop.
Save nicflores/b3cc104f202b0a688409896b79281fb1 to your computer and use it in GitHub Desktop.
with import <nixpkgs>{};
stdenv.mkDerivation rec {
name = "My-Tool";
version = "0.6.3";
src = fetchurl {
curlOpts = "-i -L -H \'Accept:application/octet-stream\'";
url = https://<githb-token>:@api.github.com/repos/<owner>/<repo>/releases/assets/<asset-id>;
sha256 = "ba2af69f6b37adce6c6368d001d5bd4f30c6e3aa19e13d276e43002a3a195f38";
};
phases = "installPhase";
installPhase = ''
mkdir -p $out/bin
cp ${src} $out/bin/mytool.jar
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment