Skip to content

Add a Nix development environment and submit pgbot to nixpkgs #31

Closed

Description

@nully0x

Hello here, I came across this project on X and I have been testing it out, I will like to make it available for my OS and workspace and for others alike.

The problem

The existing Go tooling works. This request adds a Nix option on top. It does
not change the current workflow. Today two gaps remain:

  • NixOS and Nix package users cannot install pgbot from nixpkgs.
  • Nix users cannot start a pinned dev environment with nix develop.

Proposal

Add three small Nix files to the repository root. Then submit the package
recipe to nixpkgs.

The recipe exists and builds. Local validation is complete:

  • package.nix builds pgbot versions with buildGoModule. Unit tests pass in
    the sandbox.
  • flake.nix provides nix build .#pgbot and nix develop with pinned
    Go 1.25 and golangci-lint.
  • Builds verified on x86_64-linux. aarch64-linux verified by cross compilation.

Tasks — repository

  • Add package.nix, flake.nix, to the repository root
  • Add /result(this is build result from my local test) to .gitignore
  • Add a CI job that runs nix build .#pgbot on each push and PR

Tasks — nixpkgs

  • Fork NixOS/nixpkgs. Create branch pgbot-init from master.
  • Copy the recipe to pkgs/by-name/pg/pgbot/package.nix.
  • Add a maintainer entry: username and github ID preferred
  • Answer review feedback with new commits.

Activity

  1. alexshapalov commented on Sep 7, 2026

    @alexshapalov
    Contributor

    Hi @nully0x and tnx for contribute!

    Heads up before you open the PR: pgbot is on Go 1.27 now (v0.8.1), so pin go_1_27 in the flake, and please validate against current main. Also pass -X main.version=${version} in ldflags so --version isn't "dev", and make the nix build CI job non-blocking since vendorHash changes with every dependency bump. Happy to review when it's up.

  2. nully0x commented on Sep 7, 2026

    @nully0x
    ContributorAuthor

    thank you @alexshapalov , i have this on my fork already, I will clean up and raise a PR ASAP.

  3. nully0x commented on Sep 11, 2026

    @nully0x
    ContributorAuthor

    @alexshapalov a PR is up for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions