I’m currently trying to package traggo. Here’s my current package but I’m failing with the vendorHash.
Note: I have zero experience with go.
{ lib
, buildGoModule
, fetchFromGitHub
,
}:
buildGoModule rec {
pname = "traggo";
version = "0.8.2";
src = fetchFromGitHub {
owner = "traggo";
repo = "server";
rev = "v${version}";
hash = "sha256-ls8dM8+R/SbfhS3m4aKIYfMNOFue5ZIFJkjpph3Unzs=";
};
vendorHash = lib.fakeHash;
meta = {
description = "Self-hosted tag-based time tracking";
homepage = "https://github.com/traggo/server";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ tornax ];
};
}
If I do nix build .#traggo now, then I’m getting the following output instead of a expected hash:
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/ajm04111p5zfkp8wck276rgy05mhv620-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
go: downloading github.com/gorilla/mux v1.8.1
go: downloading github.com/jmattheis/go-timemath v1.0.1
go: downloading github.com/rs/zerolog v1.34.0
go: downloading github.com/jinzhu/gorm v1.9.2
go: downloading github.com/99designs/gqlgen v0.17.85
go: downloading github.com/stretchr/testify v1.11.1
go: downloading github.com/joho/godotenv v1.5.1
go: downloading github.com/jinzhu/copier v0.4.0
go: downloading github.com/kelseyhightower/envconfig v1.4.0
go: downloading github.com/magiconair/properties v1.8.10
go: downloading golang.org/x/crypto v0.46.0
go: downloading github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
go: downloading github.com/go-sql-driver/mysql v1.4.1
go: downloading github.com/lib/pq v1.0.0
go: downloading github.com/mattn/go-sqlite3 v1.10.0
go: downloading github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading google.golang.org/appengine v1.3.0
go: downloading golang.org/x/sys v0.39.0
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading github.com/sosodev/duration v1.3.1
go: downloading github.com/vektah/gqlparser/v2 v2.5.31
go: downloading github.com/gorilla/websocket v1.5.0
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading github.com/go-viper/mapstructure/v2 v2.4.0
go: downloading github.com/agnivade/levenshtein v1.2.1
go: github.com/traggo/server/auth imports
github.com/traggo/server/generated/gqlmodel: no required module provides package github.com/traggo/server/generated/gqlmodel; to add it:
go get github.com/traggo/server/generated/gqlmodel
go: github.com/traggo/server/graphql imports
github.com/traggo/server/generated/gqlschema: no required module provides package github.com/traggo/server/generated/gqlschema; to add it:
go get github.com/traggo/server/generated/gqlschema
I have absolutely no idea what I should do now.
I tried to follow this answer https://discourse.nixos.org/t/solved-cant-get-vendorhash-for-buildgomodule/64905/3 but I don’t know what nom is and I can’t find it in the package search (I doubt that it’s the rss-reader…).