mirror of
https://github.com/numtide/treefmt.git
synced 2024-09-11 17:07:44 +03:00
feat: add CGO dependencies to devshell
Required for running tests with bench and/or race enabled. Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
parent
912dcaabd0
commit
4ffe2ca16c
@ -4,10 +4,13 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
config.perSystem = {
|
config.perSystem = {
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (pkgs.stdenv) isLinux isDarwin;
|
||||||
|
in {
|
||||||
config.devshells.default = {
|
config.devshells.default = {
|
||||||
env = [
|
env = [
|
||||||
{
|
{
|
||||||
@ -20,17 +23,24 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
packages = with pkgs;
|
packages = lib.mkMerge [
|
||||||
[
|
(with pkgs; [
|
||||||
# golang
|
# golang
|
||||||
go
|
go
|
||||||
delve
|
delve
|
||||||
pprof
|
pprof
|
||||||
graphviz
|
graphviz
|
||||||
]
|
])
|
||||||
++
|
# platform dependent CGO dependencies
|
||||||
|
(lib.mkIf isLinux [
|
||||||
|
pkgs.gcc
|
||||||
|
])
|
||||||
|
(lib.mkIf isDarwin [
|
||||||
|
pkgs.darwin.cctools
|
||||||
|
])
|
||||||
# include formatters for development and testing
|
# include formatters for development and testing
|
||||||
(import ./formatters.nix pkgs);
|
(import ./formatters.nix pkgs)
|
||||||
|
];
|
||||||
|
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user