nix: Fix go-mobile temp folder location in iOS
This commit is contained in:
parent
ce84f81741
commit
4ab64d6c40
|
@ -31,13 +31,15 @@ in buildGoPackage rec {
|
||||||
${optionalString platform.targetAndroid ''substituteInPlace cmd/gomobile/install.go --replace "\`adb\`" "\`${platform-tools}/bin/adb\`"''}
|
${optionalString platform.targetAndroid ''substituteInPlace cmd/gomobile/install.go --replace "\`adb\`" "\`${platform-tools}/bin/adb\`"''}
|
||||||
|
|
||||||
# Prevent a non-deterministic temporary directory from polluting the resulting object files
|
# Prevent a non-deterministic temporary directory from polluting the resulting object files
|
||||||
substituteInPlace cmd/gomobile/env.go --replace \
|
substituteInPlace cmd/gomobile/env.go \
|
||||||
|
--replace \
|
||||||
'tmpdir, err = ioutil.TempDir("", "gomobile-work-")' \
|
'tmpdir, err = ioutil.TempDir("", "gomobile-work-")' \
|
||||||
"tmpdir = \"$NIX_BUILD_TOP/gomobile-work\"" \
|
"tmpdir = filepath.Join(os.Getenv(\"NIX_BUILD_TOP\"), \"gomobile-work\")" \
|
||||||
--replace '"io/ioutil"' ""
|
--replace '"io/ioutil"' ""
|
||||||
substituteInPlace cmd/gomobile/init.go --replace \
|
substituteInPlace cmd/gomobile/init.go \
|
||||||
|
--replace \
|
||||||
'tmpdir, err = ioutil.TempDir(gomobilepath, "work-")' \
|
'tmpdir, err = ioutil.TempDir(gomobilepath, "work-")' \
|
||||||
"tmpdir = \"$NIX_BUILD_TOP/work\""
|
"tmpdir = filepath.Join(os.Getenv(\"NIX_BUILD_TOP\"), \"work\")"
|
||||||
|
|
||||||
echo "Creating $dev"
|
echo "Creating $dev"
|
||||||
mkdir -p $dev/src/$goPackagePath
|
mkdir -p $dev/src/$goPackagePath
|
||||||
|
|
Loading…
Reference in New Issue