Skip to content

Conversation

@acaloiaro
Copy link
Owner

  • feat: factor out gomod2nix
  • feat: factor out gomod2nix

in
import (fetchTree nixpkgs.locked) {
overlays = [
(import "${fetchTree gomod2nix.locked}/overlay.nix")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this overlay.nix go?

Comment on lines +14 to +37
darwin = build.overrideAttrs (old:
old
// {
GOOS = "darwin";
GOARCH = "amd64";
});
linux32 = build.overrideAttrs (old:
old
// {
GOOS = "linux";
GOARCH = "386";
});
x86_64-linux = build.overrideAttrs (old:
old
// {
GOOS = "linux";
GOARCH = "amd64";
});
windows64 = build.overrideAttrs (old:
old
// {
GOOS = "windows";
GOARCH = "amd64";
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of repetition here. You could extract a builder func that takes in the name, goos, goarch, map and build this object.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah agreed. My nixlang skills are not good and didn't think I'd get it done cleanly.

module github.com/acaloiaro/ess

go 1.21
go 1.23.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.24.4 is in nixpkgs already. Latest one is 1.24.6

"text/template"

"github.com/hashicorp/go-envparse"
"github.com/acaloiaro/go-envparse"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did you need to override?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hashicorp's go-envparse doesn't support env files that include non-env stuff, like comments, which ess requires.

Under the hood, nothing changed in acaloiaro/go-envparse, but I removed the replace in its go.mod that renamed it from github.com/hashicorp/go-envparse => github.com/acaloiaro/go-envparse.

I'm assuming that project won't be merging my changes, so I'm making mine I hard fork.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't hurt to submit a patch, though

version = "2.14.1";
src = ./.;
pwd = ./.;
vendorHash = "sha256-oIA1LTBvkA26ferZI+uOipLE2/wZr2XKjGfESuD/cPk=";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it much easier to just vendorize dependencies instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants