Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Created November 9, 2017 20:06
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 dustinlacewell-wk/b9cd09370c1c60157099a93f8c11d36a to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/b9cd09370c1c60157099a93f8c11d36a to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "harbour-cli";
buildInputs = [ git go glide ];
src = ./.;
phases = [ "glidePhase" "testPhase" "buildPhase" ];
token = builtins.getEnv "WORKIVA_PRIVATE_GITHUB_TOKEN";
glidePhase = ''
git config --global url."https://${token}:x-oauth-basic@github.com/".insteadOf "https://github.com/";
cd $src;
glide install;
'';
testPhase = ''
go test --cover
'';
buildPhase = ''
go build
'';
shellHook = ''
source $HOME/.secrets
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment