diff --git a/nix/pkgs/gomobile/default.nix b/nix/pkgs/gomobile/default.nix index 7a7646e379..9e72403c05 100644 --- a/nix/pkgs/gomobile/default.nix +++ b/nix/pkgs/gomobile/default.nix @@ -36,33 +36,18 @@ in buildGoPackage rec { --replace \ 'tmpdir, err = ioutil.TempDir(gomobilepath, "work-")' \ "tmpdir = filepath.Join(os.Getenv(\"NIX_BUILD_TOP\"), \"work\")" - - echo "Creating $dev" - mkdir -p $dev/src/$goPackagePath - echo "Copying from $src" - cp -a $src/. $dev/src/$goPackagePath ''; preBuild = '' mkdir $NIX_BUILD_TOP/gomobile-work $NIX_BUILD_TOP/work ''; - postInstall = - let - inherit (stdenv.lib) makeBinPath makeLibraryPath; - in '' - mkdir -p $out $bin/lib - - ln -s ${ncurses5}/lib/libncursesw.so.5 $bin/lib/libtinfo.so.5 - ${if isDarwin then '' - wrapProgram $bin/bin/gomobile \ - --prefix "PATH" : "${makeBinPath [ xcodeWrapper ]}" \ - --prefix "LD_LIBRARY_PATH" : "${makeLibraryPath [ ncurses5 zlib ]}:$bin/lib" - '' else '' - wrapProgram $bin/bin/gomobile \ - --prefix "LD_LIBRARY_PATH" : "${makeLibraryPath [ ncurses5 zlib ]}:$bin/lib" - ''} - $bin/bin/gomobile init + # Necessary for GOPATH when using gomobile. + postInstall = '' + echo "Creating $out" + mkdir -p $out/src/$goPackagePath + echo "Copying from $src" + cp -a $src/. $out/src/$goPackagePath ''; src = fetchgit { @@ -71,8 +56,6 @@ in buildGoPackage rec { url = "https://go.googlesource.com/mobile"; }; - outputs = [ "bin" "dev" "out" ]; - meta = with stdenv.lib; { description = "A tool for building and running mobile apps written in Go."; longDescription = "Gomobile is a tool for building and running mobile apps written in Go."; diff --git a/nix/status-go/mobile/build.nix b/nix/status-go/mobile/build.nix index ff7daae0d3..13e60d4830 100644 --- a/nix/status-go/mobile/build.nix +++ b/nix/status-go/mobile/build.nix @@ -45,7 +45,7 @@ in buildGoPackage { mkdir ${NIX_GOWORKDIR} export GO111MODULE=off - export GOPATH=${gomobile.dev}:$GOPATH + export GOPATH=${gomobile.out}:$GOPATH export NIX_GOWORKDIR=${NIX_GOWORKDIR} '' + optionalString (platform == "android") ''