adisbladis
59869b91af
Add getting started docs
2022-06-14 17:54:23 +08:00
adisbladis
759483247e
Align flake template with recent API changes and improvements
2022-06-14 17:35:19 +08:00
adisbladis
86ee592eb2
Move internal packages to internal subdirectory
...
So they can't be imported from external repositories.
I'm not giving any stability guarantees on anything except the CLI.
2022-06-14 17:10:32 +08:00
adisbladis
9a14682b8b
cmd/root.go: Clean up some dead code
2022-06-14 09:48:33 +08:00
adisbladis
85ee095f0d
Merge pull request #58 from adisbladis/behaviour-alignment
...
Build non-development packages in the same way as development packages
2022-06-14 08:28:07 +08:00
adisbladis
509b97c288
Build non-development packages in the same way as development packages
...
The difference in behaviour was unfortunate.
The only downside I can see is that this doesn't allow for mixed
origins in the same package, which probably shouldn't be done anyway.
2022-06-14 08:19:42 +08:00
adisbladis
60a67aaa2d
Merge pull request #57 from adisbladis/cross-fix
...
Fix cross compilation
2022-06-14 05:46:36 +08:00
adisbladis
f8646af3f2
gomod2nix: Only generate completions if we are not cross compiling
2022-06-14 05:27:43 +08:00
adisbladis
d404767bec
builder: Build internal packages for host plattform
2022-06-14 05:27:43 +08:00
adisbladis
9c1bde84d3
Merge pull request #56 from adisbladis/non-dev-deps
...
Add package generation for non development packages
2022-06-14 05:27:15 +08:00
adisbladis
1ffea526a0
Add package generation for non development packages
...
This makes it possible to generate packages that you do not have a
local checkout for, e.g. running:
`gomod2nix generate --outdir example/ golang.org/x/tools/cmd/stringer`
This will be useful for packaging dependencies that you are not
developing, but just simply packaging.
2022-06-14 05:15:43 +08:00
adisbladis
116b98475f
Merge pull request #55 from adisbladis/import-sources
...
Add an import subcommand
2022-06-13 23:39:41 +08:00
adisbladis
7224069881
Set meta on derivation
2022-06-13 23:33:28 +08:00
adisbladis
363017e3f3
Install shell completions in derivation
2022-06-13 23:33:19 +08:00
adisbladis
ab0d607923
Add an import subcommand
...
That imports sources from the local Go sources into the Nix store.
2022-06-13 23:15:35 +08:00
adisbladis
2792ae6af4
Add generate subcommand
...
Which does the same as the previous root command.
2022-06-13 23:15:35 +08:00
adisbladis
52125f6072
Use cobra for command line parsing
2022-06-13 23:15:35 +08:00
adisbladis
96e8b390aa
Merge pull request #54 from adisbladis/cgo-enabled-go-version
...
Factor out Go version / no default for CGO_ENABLED
2022-06-13 20:58:46 +08:00
adisbladis
aae59a6851
Don't set CGO_ENABLED by default
...
Instead let the compiler decide.
This will result in less cryptic errors.
2022-06-13 20:53:45 +08:00
adisbladis
ade4c20234
Factor out Go version selection from mkGoEnv and add it to buildGoApplication too
2022-06-13 20:53:45 +08:00
adisbladis
c3c8aa564d
Merge pull request #53 from tweag/mkgoenv
...
Add `mkGoEnv` function
2022-06-13 20:44:29 +08:00
adisbladis
e95e393da8
tests: Add mkGoEnv test
2022-06-13 20:37:42 +08:00
adisbladis
908ab2bb87
Precompile internal packages instead of using go run
...
It shaves off a second or so of wait time per environment.
2022-06-13 20:37:42 +08:00
adisbladis
973b050adf
fetcher: Make sure sources are writable before filtering .ds_store
2022-06-13 20:37:42 +08:00
adisbladis
1eb70073c4
Bump dependencies
2022-06-13 20:37:42 +08:00
adisbladis
a4bed25a86
Add mkGoEnv
function
...
This creates an `mkGoEnv` function which takes care of adding the
correct Go package to your development environment and installs
development dependencies from tools.go in a Nix derivation.
The "normal" workflow around Go with tools.go just sticks development
dependencies in $GOBIN which isn't ideal since you have no separation
between projects.
2022-06-13 20:37:42 +08:00
adisbladis
71c797eb0d
Merge pull request #52 from adisbladis/mac-ds-store-filter
...
Filter MacOS .DS_Store directories
2022-06-01 01:51:37 +08:00
adisbladis
d7830bd5b2
Filter MacOS .DS_Store directories
...
Now that we're hashing files directly from the Go sources on the host
system we need to avoid these files.
Closes #49 .
2022-06-01 01:46:29 +08:00
adisbladis
fb910de8cc
Merge pull request #51 from adisbladis/max-workers
...
Reintroduce the max workers flag
2022-05-31 02:13:57 +08:00
adisbladis
e1d46e6973
Reintroduce the max workers flag
...
It turns out that this is actually useful to limit the number of open files.
Fixes https://github.com/tweag/gomod2nix/issues/50 .
2022-05-31 02:07:27 +08:00
adisbladis
bf3e9afe32
Merge pull request #48 from adisbladis/third-party-2022-05-30
...
Bump go.mod dependencies
2022-05-30 20:00:09 +08:00
adisbladis
3de2f9540e
Bump go.mod dependencies
2022-05-30 19:21:48 +08:00
adisbladis
90653f16ab
Merge pull request #47 from adisbladis/flake-template
...
templates: Add a flake template
2022-05-30 19:21:37 +08:00
adisbladis
d30b3ca30a
templates: Add a flake template
2022-05-30 19:17:02 +08:00
adisbladis
3ae35c5ce1
Merge pull request #46 from adisbladis/golangci-lint
...
Add golangci-lint
2022-05-30 18:49:27 +08:00
adisbladis
f49e99e02f
github actions: Add golangci-lint
2022-05-30 18:38:04 +08:00
adisbladis
ea6b999c69
Fix golangci-lint errors
2022-05-30 18:36:26 +08:00
adisbladis
688cd6dbe3
shell.nix: Add golangci-lint
2022-05-30 18:34:43 +08:00
adisbladis
c72445c826
tests: Handle test cases without a go.mod
2022-05-30 18:33:40 +08:00
adisbladis
ce3a6771f0
gomod2nix: Filter builder expressions from cli build
2022-05-30 18:33:40 +08:00
adisbladis
453a78f7b3
Merge pull request #45 from adisbladis/cross-test
...
tests: Add a cross test
2022-05-30 18:29:31 +08:00
adisbladis
9c68732917
tests: Add a cross test
2022-05-30 18:23:54 +08:00
adisbladis
3f80d454ce
Bump flake inputs
2022-05-30 18:10:53 +08:00
adisbladis
79e326c335
Merge pull request #44 from yihuang/patch-1
...
Lower the prerequisite of gomod2nix
2022-05-30 16:45:15 +08:00
yihuang
9a26cc68c0
Lower the prerequisite of gomod2nix
...
`go_1_18` is only available in nixpkgs master, but `go_1_17` is available in stable `release-21.11`.
2022-05-30 16:40:20 +08:00
adisbladis
b9b7ac34cb
Merge pull request #43 from yihuang/GOPROXY
...
support impure env GOPROXY
2022-05-30 14:18:09 +08:00
HuangYi
36bc9ef864
support impure env GOPROXY
...
which is by go mod download
2022-05-30 11:13:30 +08:00
adisbladis
cabedd2add
Merge pull request #41 from adisbladis/go-mod-download-fetcher
...
Use `go mod download` as a fetcher
2022-05-29 16:31:28 +08:00
adisbladis
9692570d28
Github actions: Clean up superflous test.yml file
2022-05-29 16:24:58 +08:00
adisbladis
cf9aca22ba
actions: Add check to see if gomod2nix.toml is up to date
2022-05-29 16:24:58 +08:00