Use buildGoModule with local src

This may be an extremely stupid question but all the examples for buildGoModule use fetchFromGitHub. But I just want to do something like in this blog post which is using buildGoPackage. So I wrote the below code

{ pkgs ? (import ./nixpkgs.nix ) }:

with pkgs;

buildGoModule rec {
  pname = "fbrs-blog";
  version = "latest";

  modSha256 = lib.fakeSha256;

  src = "../go/";

which fails with

unpacking source archive ../go/
do not know how to unpack source archive ../go/

I looked at the source for buildGoModule but have no idea what to do.


When building from a relative source, I believe the " around the src value might cause trouble.

with import <nixpkgs> {};

buildGoModule {
  pname = "mygoproject";
  version = "0.0.1";

  src = ./.;

  modSha256 = "whatever_hash";

Yup that was it, thanks! sigh I knew it was something super simple