| ▲ | fuzztester 6 months ago | |||||||||||||||||||||||||||||||||||||||||||
why did you embed the c++ code in the .nix file? just to have everything in one file? how to show how to do it with nix? because it seem simpler to have a separate C++ file, and a simple shell script or makefile to compile it. e.g. although I could figure out roughly what the .nix file does, many more people would know plain unix shell than nix. and where is $out defined in the .nix file? | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | AnthOlei 6 months ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||
The nix file is besides the point - it gives you a totally hermetic build environment. Not OP, but it’s the only way I know how to get gcc to use a static glibc. All you should pay attention to is that it’s using a static glibc. $out is a magic variable in nix that means the output of the derivation - the directory that nix moves to its final destination | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | fuzztester 6 months ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||
and by the way, ignorant mindlessly downvoting dudes who don't even bother to check if a comment is right or not, can shove it up, and take a flying leap into Lake Titicaca. they'll meet a lot of their brothers there, like giant frogs. from a Google search: >Overview Lake Titicaca, straddling the border between Peru and Bolivia in the Andes Mountains, is one of South America's largest lakes and the world’s highest navigable body of water. Said to be the birthplace of the Incas, it’s home to numerous ruins. Its waters are famously still and brightly reflective. Around it is Titicaca National Reserve, sheltering rare aquatic wildlife such as giant frogs. :) | ||||||||||||||||||||||||||||||||||||||||||||