2024-11-21 08:59:08 +04:00
|
|
|
{
|
|
|
|
description = "nitrous";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
|
|
systems.url = "github:nix-systems/default-linux";
|
2024-11-21 18:39:24 +04:00
|
|
|
gomod2nix = {
|
|
|
|
url = "github:nix-community/gomod2nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-11-21 08:59:08 +04:00
|
|
|
};
|
|
|
|
|
2024-11-21 18:39:24 +04:00
|
|
|
outputs = { self, nixpkgs, systems, gomod2nix }:
|
2024-11-21 08:59:08 +04:00
|
|
|
let
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
eachSystem = lib.genAttrs (import systems);
|
|
|
|
pkgs = eachSystem (system:
|
|
|
|
import nixpkgs {
|
|
|
|
localSystem = system;
|
2024-11-21 18:39:24 +04:00
|
|
|
overlays = [ gomod2nix.overlays.default ];
|
2024-11-21 08:59:08 +04:00
|
|
|
});
|
|
|
|
in {
|
2024-11-21 15:46:01 +04:00
|
|
|
|
2024-11-21 18:39:24 +04:00
|
|
|
packages = eachSystem (system: {
|
|
|
|
default = pkgs.${system}.buildGoApplication {
|
|
|
|
pname = "voidway";
|
|
|
|
version = "latest";
|
|
|
|
goPackagePath = "git.sako.lol/sako/voidway/v4";
|
|
|
|
src = ./.;
|
|
|
|
modules = ./gomod2nix.toml;
|
|
|
|
};
|
|
|
|
});
|
2024-11-21 15:46:01 +04:00
|
|
|
|
2024-11-21 08:59:08 +04:00
|
|
|
devShells = eachSystem (system: {
|
|
|
|
default = pkgs.${system}.mkShell {
|
2024-11-21 18:39:24 +04:00
|
|
|
name = "v-shell";
|
|
|
|
buildInputs = with pkgs.${system}; [
|
|
|
|
go
|
|
|
|
gopls
|
|
|
|
gotools
|
|
|
|
go-tools
|
|
|
|
gomod2nix.packages.${system}.default
|
|
|
|
sqlite-interactive
|
|
|
|
];
|
2024-11-21 08:59:08 +04:00
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|