diff options
author | Jade Lovelace <software@lfcode.ca> | 2023-10-22 16:53:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-23 01:53:23 +0200 |
commit | 0504bc63e41f89d69fb5ff8e9812e8731a869106 (patch) | |
tree | be88e6d49ad76ef036b8ccda6dfbcf9e75c0db48 /pkgs/applications/blockchains | |
parent | c70f2bbf26bf17e980fc29c106b6a2777166a572 (diff) | |
download | nixpkgs-0504bc63e41f89d69fb5ff8e9812e8731a869106.tar nixpkgs-0504bc63e41f89d69fb5ff8e9812e8731a869106.tar.gz nixpkgs-0504bc63e41f89d69fb5ff8e9812e8731a869106.tar.bz2 nixpkgs-0504bc63e41f89d69fb5ff8e9812e8731a869106.tar.lz nixpkgs-0504bc63e41f89d69fb5ff8e9812e8731a869106.tar.xz nixpkgs-0504bc63e41f89d69fb5ff8e9812e8731a869106.tar.zst nixpkgs-0504bc63e41f89d69fb5ff8e9812e8731a869106.zip |
doc/stdenv: rewrite manual build procedure to be closer to an auto-build (#262137)
* doc/stdenv: rewrite manual build procedure to be closer to an auto-build This is based on <https://jade.fyi/blog/building-nix-derivations-manually/> plus some more original research. The previous version of this section did not work for your choice of simple Haskell package, e.g. haskellPackages.hscolour, due to things like `compileBuildDriverPhase` and other custom phases that it does not address at all. It seems more correct to use genericBuild in development to harmonize it with what is actually done. I feel a little bit like I am committing a sin by suggesting using the experimental CLI in the manual (afaict I am the first to do this), but I have given the old version of the command, and there are justifiable reasons to do it: * The noted limitations with env-vars are fixed. The one with the non-empty temp directory was one I ran into myself and oh boy was that not fun to debug. * Additionally the outputs are set *before* sourcing `setup.sh`: there is an issue with nix-shell where the original version of `$out` winds up in `NIX_LDFLAGS` due to _addRpathPrefix, which means that resulting executables may not run properly. It is sad that `nix develop` propagates a wrong value of `SHELL` to builders, though. It is equally sad that `nix-shell` is essentially abandoned upstream, with undocumented and not insignificant differences from `nix develop`. For the exact script differences: https://github.com/NixOS/nix/blob/17e6b85d05b3d32df244b1d4e89aa41fd8bdcae8/src/nix-build/nix-build.cc#L516-L551 https://github.com/NixOS/nix/blob/db026103b18fb8b5a719594502edd0f89eb9c268/src/nix/get-env.sh Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Diffstat (limited to 'pkgs/applications/blockchains')
0 files changed, 0 insertions, 0 deletions