Skip to content

Commit 56b8849

Browse files
author
Xe Iaso
committed
Add Nix flakes detritus so I can test this locally
Signed-off-by: Xe <[email protected]>
1 parent fed1e71 commit 56b8849

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
result
2+
.direnv

flake.lock

Lines changed: 42 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: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
description = "A basic Go web server setup";
3+
4+
inputs = {
5+
nixpkgs.url = "nixpkgs/nixos-unstable";
6+
utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs = { self, nixpkgs, utils }:
10+
utils.lib.eachSystem [
11+
"x86_64-linux"
12+
"aarch64-linux"
13+
"x86_64-darwin"
14+
"aarch64-darwin"
15+
] (system:
16+
let
17+
pkgs =
18+
import nixpkgs {
19+
inherit system;
20+
overlays = [
21+
(final: prev: {
22+
go = prev.go_1_19;
23+
buildGoModule = prev.buildGo119Module;
24+
})
25+
];
26+
};
27+
in {
28+
devShells.default = pkgs.mkShell {
29+
buildInputs = with pkgs; [ go gopls gotools go-tools ];
30+
};
31+
});
32+
}

0 commit comments

Comments
 (0)