Go GUI package panics when trying to open shared objects

I’m trying to package this project:

It should be a straight forward Go project, and so is the package.nix file I started with (also available here:

{
  lib,
  buildGoModule,
  fetchFromGitLab,
}:

buildGoModule rec {
  pname = "equ";
  version = "1.2.0";

  src = fetchFromGitLab {
    owner = "cznic";
    repo = "equ";
    rev = "v${version}";
    hash = "sha256-o69FwmYGv+ngXxXaxIkKc5OcV+/fAYwyZ+WZenZ4C4I=";
  };

  vendorHash = "sha256-mUJaYOgO2QoJ/Gm0tmKWUhIrYm/4wHlyb0H8rI/goHA=";

  meta = {
    description = "Plain TeX math editor";
    homepage = "https://gitlab.com/cznic/equ";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ doronbehar ];
    mainProgram = "equ";
  };
}

It builds fine, and then running it with the -g CLI option that should open a GUI, panics:

panic: code=wm title .  -> r= err=libz.so.1: cannot open shared object file: No such file or directory

goroutine 1 [running, locked to thread]:
modernc.org/tk9%2e0.fail(...)
        modernc.org/tk9.0@v0.68.1/tk.go:432
modernc.org/tk9%2e0.evalErr({0xc000012400, 0xb})
        modernc.org/tk9.0@v0.68.1/tk.go:419 +0x337
modernc.org/tk9%2e0.(*Window).WmTitle(0xdecd5f?, {0x0?, 0x10?})
        modernc.org/tk9.0@v0.68.1/tk.go:1960 +0x93
main.(*app).gmain(0xc000194240, 0xc0000e0000?)
        modernc.org/equ/gui.go:68 +0x35
main.(*app).main(0x0?, 0xc000014090?)
        modernc.org/equ/main.go:171 +0x23f
main.main()
        modernc.org/equ/main.go:111 +0x54a

I tried to go build this project from a Git Clone, and got:

Could not start dynamically linked executable: ./equ
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld

Does anyone has any idea how do Go packages that provide a GUI work in NixOS?