sanic/flake.nix

43 lines
1 KiB
Nix
Raw Normal View History

2023-10-17 23:10:58 +02:00
{
description = "chaos music control";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
2023-10-24 15:59:04 +02:00
gomod2nix = {
url = "github:tweag/gomod2nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
2023-10-17 23:10:58 +02:00
};
2023-10-24 15:59:04 +02:00
outputs = { self, nixpkgs, flake-utils, gomod2nix }: flake-utils.lib.eachDefaultSystem (system:
2023-10-17 23:10:58 +02:00
let
2023-10-24 15:59:04 +02:00
pkgs = import nixpkgs {
inherit system;
overlays = [ gomod2nix.overlays.default ];
};
sanic = pkgs.buildGoApplication {
pname = "sanic";
version = "0.0.1";
src = ./.;
modules = ./gomod2nix.toml;
};
2024-01-26 14:18:46 +01:00
in
{
2024-01-29 22:09:02 +01:00
packages.default = sanic;
2024-01-26 14:18:46 +01:00
formatter = pkgs.nixpkgs-fmt;
2023-10-17 23:10:58 +02:00
devShells.default = pkgs.mkShell {
2023-10-24 15:59:04 +02:00
buildInputs = with pkgs; [
2023-10-19 17:58:36 +02:00
go
2024-01-26 14:18:46 +01:00
go-tools # staticcheck
2023-10-24 15:59:04 +02:00
gomod2nix.packages.${system}.default
];
packages = with pkgs; [
2023-10-18 00:40:17 +02:00
mpd
mpc-cli
2023-10-17 23:10:58 +02:00
];
};
}
);
}
2024-01-29 22:09:02 +01:00