feat: remove CGO dependencies and disable

Not required

Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
Brian McGee 2024-06-30 12:20:49 +01:00
parent 986f020c3d
commit aea75cdeb1
No known key found for this signature in database
GPG Key ID: D49016E76AD1E8C0
2 changed files with 57 additions and 67 deletions

View File

@ -2,23 +2,16 @@
pkgs,
perSystem,
...
}: let
inherit (pkgs) lib;
inherit (pkgs.stdenv) isLinux isDarwin;
in
perSystem.devshell.mkShell {
}:
perSystem.devshell.mkShell {
env = [
{
name = "GOROOT";
value = pkgs.go + "/share/go";
}
{
name = "LD_LIBRARY_PATH";
value = "$DEVSHELL_DIR/lib";
}
];
packages = lib.mkMerge [
packages = pkgs.lib.mkMerge [
(with pkgs; [
# golang
go
@ -31,9 +24,6 @@ in
# docs
nodejs
])
# platform dependent CGO dependencies
(lib.mkIf isLinux [pkgs.gcc])
(lib.mkIf isDarwin [pkgs.darwin.cctools])
# include formatters for development and testing
(import ./packages/treefmt/formatters.nix pkgs)
];
@ -70,4 +60,4 @@ in
};
}
];
}
}

View File

@ -37,7 +37,7 @@ in
modules = ./gomod2nix.toml;
CGO_ENABLED = 1;
CGO_ENABLED = 0;
ldflags = [
"-s"