Commit graph

5 commits

Author SHA1 Message Date
HuangYi
71fd703317
Invalid regex on macOS
- fix the regex
2022-07-29 19:38:34 +08:00
adisbladis
d831b947fc Fix go.mod parser for repeated replace directives
Constructs such as
```
replace google.golang.org/grpc => google.golang.org/grpc v1.33.2
replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
```

Are perfectly valid and we previously discarded every one but the last of them.
2022-05-29 16:23:37 +08:00
HuangYi
c3f885a5b6
fix comments filter 2022-01-10 16:07:26 +08:00
yihuang
af2ff6eb58
fix regex expression on macos 2021-04-02 10:59:32 +08:00
adisbladis
442b4154e2
Add support for local replace directives
This fixes relative path modules not being correctly vendored by
parsing go.mod in Nix and vendoring them into the correct directory in
the Nix sandbox.

Ideally this should also come with a pluggable source filtering
mechanism and/or maybe use any present gitignore files like
poetry2nix does.

To use this new feature you have to pass a new `pwd` param to
`buildGoApplication` as such:
```
buildGoApplication {
  pname = "foo";
  version = "bar";
  pwd = ./.;
  src = lib.cleanSource ./.;
}
```

Fixes #2
2021-03-29 17:20:50 +02:00