Skip to content

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

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.

Follow-up

  • On each release: bump the version, refresh the two hashes, and open a
    pgbot: 0.4.X -> 0.4.Y PR.

Activity

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