Skip to content

Commit

Permalink
Add Nix flake with dev shell
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Jun 26, 2024
1 parent 47f2674 commit 94cb09d
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
85 changes: 85 additions & 0 deletions flake.lock

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

36 changes: 36 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
description = "Devshell flake";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay = {
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
url = "github:oxalica/rust-overlay";
};
};

outputs = { self, nixpkgs, flake-utils, rust-overlay } @ inputs:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit overlays system;
};
in
{
formatter = pkgs.nixpkgs-fmt;

devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
go
gofumpt
golangci-lint
];
};
}
);
}

0 comments on commit 94cb09d

Please sign in to comment.