sanic/flake.nix

40 lines
1,000 B
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;
};
2023-10-17 23:10:58 +02:00
in {
2023-10-24 17:08:45 +02:00
defaultPackage = sanic;
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
2023-10-24 15:59:04 +02:00
gomod2nix.packages.${system}.default
2023-11-23 23:37:33 +01:00
sanic
2023-10-24 15:59:04 +02:00
];
packages = with pkgs; [
2023-10-18 00:40:17 +02:00
mpd
mpc-cli
2023-10-17 23:10:58 +02:00
];
};
}
);
}