{ lib, buildGoModule, version, }: buildGoModule { pname = "allmende"; inherit version; # Only what the Go build reads, so editing docs or tests does not rebuild. # web/dist is the pre-built UI that the binary embeds. src = lib.fileset.toSource { root = ../.; fileset = lib.fileset.unions [ ../go.mod ../go.sum ../cmd ../internal ../web/embed.go ../web/dist ]; }; # Changes whenever go.mod or go.sum do: set it to lib.fakeHash, build, and # copy the hash from the error. vendorHash = "sha256-vUBmsqyS+/qXo3UDYzZmZQYik7rMhOrX7csy56UJbLU="; subPackages = [ "cmd/allmende" ]; env.CGO_ENABLED = "0"; ldflags = [ "-s" "-w" ]; # The tests start libp2p nodes and need loopback networking and mDNS, which # the build sandbox does not give. `make test` runs them. doCheck = false; meta = { description = "A free, distributed marketplace for buying, selling and renting"; license = lib.licenses.agpl3Only; mainProgram = "allmende"; }; }