-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathflake.nix
More file actions
49 lines (46 loc) · 1.42 KB
/
flake.nix
File metadata and controls
49 lines (46 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
description = "XMTP v2 and v3 go node implementation";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# go 1.20.14 https://lazamar.co.uk/nix-versions/
old-nixpkgs.url = "github:NixOs/nixpkgs/087f43a1fa052b17efd441001c4581813c34bc19";
};
outputs = inputs@{ flake-parts, nixpkgs, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { pkgs, lib, system, ... }:
let
pkgs-go120 = import inputs.old-nixpkgs { inherit system; };
in
{
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [
(_: prev: {
inherit (pkgs-go120) go_1_20;
})
];
};
devShells.default = pkgs.mkShell {
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = with pkgs; [
go_1_20
mockgen
moreutils
protoc-gen-go
gopls
go-mockery
golangci-lint
golines
moreutils
shellcheck
protobuf
protolint
buf
gopls
] ++ lib.optionals pkgs.stdenv.isDarwin [ pkgs.darwin.cctools ];
};
};
};
}