voidway/flake.nix

49 lines
1.2 KiB
Nix
Raw Permalink Normal View History

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";
gomod2nix = {
url = "github:nix-community/gomod2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-11-21 08:59:08 +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;
overlays = [ gomod2nix.overlays.default ];
2024-11-21 08:59:08 +04:00
});
in {
2024-11-21 15:46:01 +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 {
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
};
});
};
}