Nix Flake: Go-based web development tools

Packages included:

Usage

With Flakes

Add this repo to your flake.nix inputs like:

{
  # ...
  inputs.golang-webdev.url = "github:thelonelyghost/golang-webdev-nix";
  # ...

  outputs = { self, nixpkgs, flake-utils, golang-webdev, ...}@attrs:
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = import nixpkgs {
        inherit system;
      };
      go = golang-webdev.packages."${system}";
    in {
      devShell = pkgs.mkShell {
        nativeBuildInputs = [
          pkgs.bashInteractive
          go.buffalo
        ];
      };
    });
}

Updating: Anytime you want to update what golang-webdev offers, run nix flake lock --update-input golang-webdev and rebuild your nix expression acccordingly.

Without Flakes

If you're not yet using Nix Flakes, such as with home-manager, here's how you can include it:

  1. Install niv and run niv init
  2. Run niv add thelonelyghost/golang-webdev-nix --name golang-webdev
  3. Include the following in your code:
{ lib, config, ... }:

let
  sources = import ./nix/sources.nix {};
  pkgs = import sources.nixpkgs {};

  golang-webdev = (import (pkgs.fetchFromGitHub { inherit (sources.golang-webdev) owner repo rev sha256; })).outputs.packages."${builtins.currentSystem}";
in
{
  home.packages = [
    golang-webdev.buffalo
  ];
}

Updating: Anytime you want to update what golang-webdev offers, run niv update golang-webdev and rebuild your nix expression acccordingly.