Commit graph

9 commits

Author SHA1 Message Date
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
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
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
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
ecb0d11088 generate: Set correct working directory for go mod download 2022-05-28 22:56:52 +08:00
adisbladis
6273e2cefb Remove max workers argument
Now that we're not spawning subprocesses like crazy it's far less
relevant to limit concurrency.
2022-05-28 22:56:52 +08:00
adisbladis
53270b071e Replace dependency on Nix with go-nix
This calculates the output hashes in pure Go and removes Nix from
being a run time dependency of gomod2nix.

Additionally it should be faster, but that's untested.
2022-05-28 22:56:52 +08:00
adisbladis
5125e0aa97 Add back internal caching for previously generated packages 2022-05-28 22:56:52 +08:00
adisbladis
1d2041bfc6 Restructure internal package names 2022-05-28 22:56:52 +08:00