Skip to content

Commit

Permalink
examples: update to the latest nixpkgs
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Sep 13, 2023
1 parent 3d3791a commit 18170cc
Show file tree
Hide file tree
Showing 13 changed files with 436 additions and 198 deletions.
30 changes: 24 additions & 6 deletions examples/golang-httpserver-flake/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions examples/golang-httpserver-flake/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@
app = pkgs.buildGoModule {
name = "golang-httpserver";
src = ./.;
vendorSha256 = "FdDIvZrvGFHk7aqjLtJsiqsIHM6lob9iNPLd7ITau7o=";
vendorSha256 = "sha256-0HDZ3llIgLMxRLNei93XrcYliBzjajU6ZPllo3/IZVY=";
runVend = true;
};
in rec {
defaultPackage = pkgs.dockerTools.buildImage {
name = "golang-httpserver";
tag = "nix";
contents = [ pkgs.bash pkgs.coreutils app ];
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths= [ pkgs.bash pkgs.coreutils app ];
};
config = {
Cmd = [ "golang-httpserver" ];
ExposedPorts = { "80/tcp" = { }; };
Expand Down
6 changes: 4 additions & 2 deletions examples/golang-httpserver-flake/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module github.com/reproducible-containers/buildkit-nix/examples/golang-httpserver

go 1.16
go 1.20

require github.com/sirupsen/logrus v1.8.1
require github.com/sirupsen/logrus v1.9.3

require golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
17 changes: 11 additions & 6 deletions examples/golang-httpserver-flake/go.sum
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
30 changes: 24 additions & 6 deletions examples/nginx-flake/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/nginx-flake/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
Volumes = {
"/etc" = { };
"/var" = { };
"/tmp" = { };
};
};
};
Expand Down
1 change: 1 addition & 0 deletions examples/nginx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ in pkgs.dockerTools.buildImage {
Volumes = {
"/etc" = { };
"/var" = { };
"/tmp" = { };
};
};
}
12 changes: 6 additions & 6 deletions examples/nginx/nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "5830a4dd348d77e39a0f3c4c762ff2663b602d4c",
"sha256": "1d3lsrqvci4qz2hwjrcnd8h5vfkg8aypq3sjd4g3izbc8frwz5sm",
"rev": "9341b1027da2c2f95f8e808a3cb4b403e0a62c77",
"sha256": "1l996s518iv7bcfzzhxlsn35ahbslpbvhl3ds1zpnama7la23y9b",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/5830a4dd348d77e39a0f3c4c762ff2663b602d4c.tar.gz",
"url": "https://github.com/nmattia/niv/archive/9341b1027da2c2f95f8e808a3cb4b403e0a62c77.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
Expand All @@ -17,10 +17,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f03e55c9fc9d013adb2b4c6d61a2c78956c6ee6a",
"sha256": "03krwlw73lw4nmgj47ds1qmvcf1xpsl46g78b01kg7xklpiqwcxy",
"rev": "c75843c2a3af9e76ef1d5ceb68a240a894f7162a",
"sha256": "1fai41392fj5hzfr8swj3q2pmc72452lrl8c0bnhkf6hjms513cv",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/f03e55c9fc9d013adb2b4c6d61a2c78956c6ee6a.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/c75843c2a3af9e76ef1d5ceb68a240a894f7162a.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
Loading

0 comments on commit 18170cc

Please sign in to comment.