Skip to content

Commit

Permalink
Introduce Nix flake for a development shell
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbakker committed Jan 1, 2024
1 parent ee05a77 commit 81ec557
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/
nodes.json
nodes.json
result
60 changes: 60 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
description = "Nix flake for ToxStatus";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
packages = flake-utils.lib.flattenTree rec {
default = toxstatus;
toxstatus = with pkgs; buildGoModule rec {
name = "toxstatus";
src = ./.;

subPackages = [ "cmd/toxstatus" ];
vendorHash = "sha256-7Z/ShmVKlx64xH0JiDv97y/KbEDw8IOUJJ2h02h+zRE=";
};
};
devShell = with pkgs; mkShell {
buildInputs = [
go
];
};
}
);
}
7 changes: 0 additions & 7 deletions shell.nix

This file was deleted.

0 comments on commit 81ec557

Please sign in to comment.