mirror of
https://github.com/status-im/status-react.git
synced 2025-01-09 18:46:19 +00:00
Jakub Sokołowski
7b6b620ceb
Changes: - Add `nix/DETAILS.md` for more in-depth info - Rename some of `config.status-im` variables - Drop `env` argument for Android build - Use `overlays` instead of `packageOverrides` - Move the `pkgs` overlay to `nix/overlay.nix` - Move `nix/status-go/utils.nix` to `nix/tools` - Make `shell.nix` use the `shells.default` only - Use `default.nix` as target for `nix/scripts/shell.sh` - Make `nix/scripts/shell.sh` use `--attr` instead of `target` - Drop the `target` argument in favour of using `--attr` - Drop unnecessary `src` from `nix/mobile/ios/default.nix` - Move `mkShell` and `mergeSh` under `lib` - Move `patched-go` package to `nix/pkgs` directory - Move `gomobile` package to `nix/pkgs` directory - Move `ANDROID_ABI_SPLIT` to `config.status-im.android.abi-split` - Move `ANDROID_ABI_INCLUDE to `config.status-im.android.abi-include` Signed-off-by: Jakub Sokołowski <jakub@status.im>
19 lines
634 B
Nix
19 lines
634 B
Nix
# Patch the Go compiler so that we can have a say (using a NIX_GOWORKDIR env variable)
|
|
# as to the temporary directory it uses for linking, since that directory path ends up
|
|
# in the string table and .gnu.version_d ELF header.
|
|
#
|
|
|
|
{ go }:
|
|
|
|
go.overrideDerivation (oldAttrs: {
|
|
postPatch = (oldAttrs.postPatch or "") + ''
|
|
substituteInPlace "src/cmd/go/internal/work/action.go" --replace \
|
|
'tmp, err := ioutil.TempDir(os.Getenv("GOTMPDIR"), "go-build")' \
|
|
'var err error
|
|
tmp := os.Getenv("NIX_GOWORKDIR")
|
|
if tmp == "" {
|
|
tmp, err = ioutil.TempDir(os.Getenv("GOTMPDIR"), "go-build")
|
|
}'
|
|
'';
|
|
})
|