Add support for distributing bsubio CLI through nixpkgs for Nix and NixOS users.
Goal
Enable Nix/NixOS users to install bsubio using their native package manager.
Distribution Options
1. Official nixpkgs Repository (Recommended)
- Submit package to https://github.com/NixOS/nixpkgs
- Users install with:
nix-env -iA nixpkgs.bsubio
- NixOS users add to configuration.nix:
environment.systemPackages = [ pkgs.bsubio ];
- Requires creating and submitting a PR to nixpkgs
2. Flakes Support
- Create flake.nix in repository
- Users can run directly:
nix run github:bsubio/cli
- Can be added to flake inputs
Implementation Plan
Phase 1: Create Nix Package Expression
- Create a derivation for bsubio
- Test locally with nix-build
- Support both x86_64-linux and aarch64-linux
Phase 2: Submit to nixpkgs
- Fork nixpkgs repository
- Add package to pkgs/by-name/bs/bsubio/package.nix
- Create PR to nixpkgs
- Work with maintainers for review
Phase 3: Add Flake Support (Optional)
- Create flake.nix in repository
- Enable direct installation via flakes
Example Package Definition
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "bsubio";
version = "0.11.0";
src = fetchFromGitHub {
owner = "bsubio";
repo = "cli";
rev = "v${version}";
sha256 = "...";
};
vendorHash = "...";
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
meta = with lib; {
description = "CLI for easy running heavy duty compute jobs in the cloud";
homepage = "https://bsub.io";
license = licenses.mit;
maintainers = [ ];
};
}
Installation After Implementation
# Nix package manager
nix-env -iA nixpkgs.bsubio
# NixOS configuration.nix
environment.systemPackages = [ pkgs.bsubio ];
# With flakes
nix run github:bsubio/cli
References
Add support for distributing bsubio CLI through nixpkgs for Nix and NixOS users.
Goal
Enable Nix/NixOS users to install bsubio using their native package manager.
Distribution Options
1. Official nixpkgs Repository (Recommended)
nix-env -iA nixpkgs.bsubioenvironment.systemPackages = [ pkgs.bsubio ];2. Flakes Support
nix run github:bsubio/cliImplementation Plan
Phase 1: Create Nix Package Expression
Phase 2: Submit to nixpkgs
Phase 3: Add Flake Support (Optional)
Example Package Definition
Installation After Implementation
References