Open apoelstra opened 1 month ago
This only changes the template. Is there a script or something I need to run to update the other Cargo.nix files in this repo?
Here is the offending line in stdenv: https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L1516-L1521
You can see that if Makefile doesn't exist, it just prints a message and succeeds. If it does exist, it tries to mkdir $prefix and this fails.
In a "normal" Rust crate, the installPhase will do nothing, since stdenv setup.sh will look for a file called Makefile, and then bail out when it doesn't find it.
However, in a Rust crate that has a file called Makefile, the installPhase will run, and will do broken things. In particular, I see consistent failures of the form
This derivation was introduced in #357; previously we simply used runCommand which has no notion of "phases". When we switched to stdenv we moved the runCommand functionality into buildPhase and didn't consider that any of the other default phases might do bad stuff.