-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove gomod2nix #19
base: main
Are you sure you want to change the base?
remove gomod2nix #19
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,38 @@ | ||
{ pkgs ? ( | ||
let | ||
inherit (builtins) fetchTree fromJSON readFile; | ||
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix; | ||
in | ||
import (fetchTree nixpkgs.locked) { | ||
overlays = [ | ||
(import "${fetchTree gomod2nix.locked}/overlay.nix") | ||
]; | ||
} | ||
) | ||
, buildGoApplication ? pkgs.buildGoApplication | ||
}: | ||
|
||
buildGoApplication { | ||
pname = "ess"; | ||
version = "2.14.1"; | ||
pwd = ./.; | ||
src = ./.; | ||
modules = ./gomod2nix.toml; | ||
{pkgs ? import <nixpkgs> {}}: let | ||
build = pkgs.buildGoModule { | ||
pname = "ess"; | ||
version = "2.14.1"; | ||
src = ./.; | ||
pwd = ./.; | ||
vendorHash = "sha256-oIA1LTBvkA26ferZI+uOipLE2/wZr2XKjGfESuD/cPk="; | ||
meta = { | ||
description = "ess (env-sample-sync): automatically and safely synchronize env.sample files with .env"; | ||
license = pkgs.lib.licenses.bsd2; | ||
}; | ||
}; | ||
in { | ||
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"; | ||
}); | ||
Comment on lines
+14
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
module github.com/acaloiaro/ess | ||
|
||
go 1.21 | ||
go 1.23.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
replace github.com/hashicorp/go-envparse v0.1.0 => github.com/acaloiaro/go-envparse v0.3.0 | ||
|
||
require github.com/hashicorp/go-envparse v0.1.0 | ||
require github.com/acaloiaro/go-envparse v0.4.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
github.com/acaloiaro/go-envparse v0.3.0 h1:TGHMQ6VK8ABhqalxaRTU2gj75dCDorQq6YTxGVI5X+4= | ||
github.com/acaloiaro/go-envparse v0.3.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc= | ||
github.com/acaloiaro/go-envparse v0.4.0 h1:QmiRB66+dYTbOxDIZ9qGvA3PdzOddBZFgpe1J/vFr/U= | ||
github.com/acaloiaro/go-envparse v0.4.0/go.mod h1:0l65juEw9L8yTwKGdhoNBLtxeaSGGNr26DZXmWB7MsU= |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ import ( | |
"strings" | ||
"text/template" | ||
|
||
"github.com/hashicorp/go-envparse" | ||
"github.com/acaloiaro/go-envparse" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What did you need to override? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Under the hood, nothing changed in acaloiaro/go-envparse, but I removed the I'm assuming that project won't be merging my changes, so I'm making mine I hard fork. |
||
) | ||
|
||
const VERSION = "2.14.1" | ||
|
There was a problem hiding this comment.
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?