Skip to content

Commit 94cb09d

Browse files
committed
Add Nix flake with dev shell
1 parent 47f2674 commit 94cb09d

File tree

2 files changed

+121
-0
lines changed

2 files changed

+121
-0
lines changed

flake.lock

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
description = "Devshell flake";
3+
4+
inputs = {
5+
flake-utils.url = "github:numtide/flake-utils";
6+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
7+
rust-overlay = {
8+
inputs = {
9+
flake-utils.follows = "flake-utils";
10+
nixpkgs.follows = "nixpkgs";
11+
};
12+
url = "github:oxalica/rust-overlay";
13+
};
14+
};
15+
16+
outputs = { self, nixpkgs, flake-utils, rust-overlay } @ inputs:
17+
flake-utils.lib.eachDefaultSystem (system:
18+
let
19+
overlays = [ (import rust-overlay) ];
20+
pkgs = import nixpkgs {
21+
inherit overlays system;
22+
};
23+
in
24+
{
25+
formatter = pkgs.nixpkgs-fmt;
26+
27+
devShells.default = pkgs.mkShell {
28+
buildInputs = with pkgs; [
29+
go
30+
gofumpt
31+
golangci-lint
32+
];
33+
};
34+
}
35+
);
36+
}

0 commit comments

Comments
 (0)