mirror of
https://github.com/status-im/status-react.git
synced 2025-02-11 10:26:52 +00:00
nix: add fake git to status-go build derivation (#21989)
This commit adds a script that overrides `git` to echo version required by `status-go` derivation. Also fixes error messages like this when building `status-go` : ``` fatal: not a git repository (or any of the parent directories): .git ``` These messages can be often misleading to some developers.
This commit is contained in:
parent
1e48442d67
commit
c1230319e1
@ -1,4 +1,4 @@
|
|||||||
{ callPackage, lib, buildGoPackage
|
{ callPackage, lib, buildGoPackage, pkgs
|
||||||
, androidPkgs, openjdk, gomobile, xcodeWrapper, removeReferencesTo
|
, androidPkgs, openjdk, gomobile, xcodeWrapper, removeReferencesTo
|
||||||
, go-bindata, mockgen, protobuf3_20, protoc-gen-go
|
, go-bindata, mockgen, protobuf3_20, protoc-gen-go
|
||||||
, meta
|
, meta
|
||||||
@ -15,6 +15,8 @@ let
|
|||||||
isIOS = platform == "ios";
|
isIOS = platform == "ios";
|
||||||
isAndroid = platform == "android";
|
isAndroid = platform == "android";
|
||||||
enforceXCodeAvailable = callPackage ./enforceXCodeAvailable.nix { };
|
enforceXCodeAvailable = callPackage ./enforceXCodeAvailable.nix { };
|
||||||
|
# Fixes fatal: not a git repository (or any of the parent directories): .git
|
||||||
|
fakeGit = pkgs.writeScriptBin "git" "echo ${source.version}";
|
||||||
|
|
||||||
in buildGoPackage rec {
|
in buildGoPackage rec {
|
||||||
pname = source.repo;
|
pname = source.repo;
|
||||||
@ -29,7 +31,7 @@ in buildGoPackage rec {
|
|||||||
|
|
||||||
extraSrcPaths = [ gomobile ];
|
extraSrcPaths = [ gomobile ];
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20
|
gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20 fakeGit
|
||||||
] ++ optional isAndroid openjdk
|
] ++ optional isAndroid openjdk
|
||||||
++ optional isIOS xcodeWrapper;
|
++ optional isIOS xcodeWrapper;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user