We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 912dcaa commit 4ffe2caCopy full SHA for 4ffe2ca
nix/devshell.nix
@@ -4,10 +4,13 @@
4
];
5
6
config.perSystem = {
7
+ lib,
8
pkgs,
9
config,
10
...
- }: {
11
+ }: let
12
+ inherit (pkgs.stdenv) isLinux isDarwin;
13
+ in {
14
config.devshells.default = {
15
env = [
16
{
@@ -20,17 +23,24 @@
20
23
}
21
24
22
25
- packages = with pkgs;
- [
26
+ packages = lib.mkMerge [
27
+ (with pkgs; [
28
# golang
29
go
30
delve
31
pprof
32
graphviz
- ]
- ++
33
+ ])
34
+ # platform dependent CGO dependencies
35
+ (lib.mkIf isLinux [
36
+ pkgs.gcc
37
38
+ (lib.mkIf isDarwin [
39
+ pkgs.darwin.cctools
40
41
# include formatters for development and testing
- (import ./formatters.nix pkgs);
42
+ (import ./formatters.nix pkgs)
43
+ ];
44
45
commands = [
46
0 commit comments