Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Twey
Created February 13, 2019 14: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 Twey/61db90e1286212aad2afe1fe58fd6800 to your computer and use it in GitHub Desktop.
Save Twey/61db90e1286212aad2afe1fe58fd6800 to your computer and use it in GitHub Desktop.
with import <nixpkgs> { };
stdenv.mkDerivation {
name = "static-test";
src = writeTextFile {
name = "test.cc";
text = "int main() { }";
};
phases = [ "buildPhase" "installPhase" ];
buildPhase = "g++ $src -o test";
installPhase = "mkdir -p $out/bin; cp test $out/bin";
# buildInputs = [ glibc.static ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment