chore(fun/clbot): switch from buildGo to buildGoModule
Fixes: https://git.snix.dev/snix/snix/issues/85 Change-Id: I2b2be44fdbbfaba19335c56ad37a6eb5cf206c5b Reviewed-on: https://cl.snix.dev/c/snix/+/30185 Reviewed-by: Florian Klink <flokli@flokli.de> Tested-by: besadii Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
This commit is contained in:
parent
b69cd940cf
commit
38804591de
4 changed files with 20 additions and 56 deletions
|
|
@ -1,14 +0,0 @@
|
|||
{ depot, ... }:
|
||||
|
||||
let
|
||||
inherit (depot.third_party) gopkgs;
|
||||
in
|
||||
depot.nix.buildGo.package {
|
||||
name = "code.tvl.fyi/fun/clbot/backoffutil";
|
||||
srcs = [
|
||||
./backoffutil.go
|
||||
];
|
||||
deps = [
|
||||
gopkgs."github.com".cenkalti.backoff.gopkg
|
||||
];
|
||||
}
|
||||
|
|
@ -1,19 +1,25 @@
|
|||
{ depot, ... }@args:
|
||||
{ pkgs, ... }@args:
|
||||
|
||||
let
|
||||
clbot = depot.fun.clbot;
|
||||
gopkgs = depot.third_party.gopkgs;
|
||||
inherit (pkgs) lib;
|
||||
in
|
||||
depot.nix.buildGo.program {
|
||||
|
||||
pkgs.buildGoModule {
|
||||
name = "clbot";
|
||||
srcs = [
|
||||
./clbot.go
|
||||
];
|
||||
deps = [
|
||||
clbot.gerrit
|
||||
gopkgs."github.com".davecgh.go-spew.spew.gopkg
|
||||
gopkgs."github.com".golang.glog.gopkg
|
||||
gopkgs."golang.org".x.crypto.ssh.gopkg
|
||||
gopkgs."gopkg.in"."irc.v3".gopkg
|
||||
];
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./clbot.go
|
||||
./clbot_test.go
|
||||
./go.mod
|
||||
./go.sum
|
||||
./backoffutil
|
||||
./gerrit
|
||||
];
|
||||
};
|
||||
vendorHash =
|
||||
# Assert the expected go.sum hash matches so we don't forget to update the FOD hash on dependency changes.
|
||||
assert builtins.hashFile "sha256" ./go.sum
|
||||
== "f999a34979af2113b867446a445a4d8c066d68f945cd4470fe33fe4fead6d15b";
|
||||
"sha256-IvFg+/lwBsJiJoLCRP5KU5+tRuHDLpwWHHkmt67yJd8=";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{ depot, ... }:
|
||||
|
||||
let
|
||||
inherit (depot.fun) clbot;
|
||||
inherit (depot.third_party) gopkgs;
|
||||
in
|
||||
depot.nix.buildGo.package {
|
||||
name = "code.tvl.fyi/fun/clbot/gerrit";
|
||||
srcs = [
|
||||
./watcher.go
|
||||
];
|
||||
deps = [
|
||||
clbot.gerrit.gerritevents
|
||||
clbot.backoffutil
|
||||
gopkgs."github.com".golang.glog.gopkg
|
||||
gopkgs."golang.org".x.crypto.ssh.gopkg
|
||||
];
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ depot, ... }:
|
||||
|
||||
depot.nix.buildGo.package {
|
||||
name = "code.tvl.fyi/fun/clbot/gerrit/gerritevents";
|
||||
srcs = [
|
||||
./time.go
|
||||
./types.go
|
||||
./events.go
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue