diff --git a/pkgs/modules/default.nix b/pkgs/modules/default.nix index a20833bd..9d614319 100644 --- a/pkgs/modules/default.nix +++ b/pkgs/modules/default.nix @@ -67,6 +67,13 @@ let }); })) + (mkModule (import ./go { + inherit (pkgs) go; + })) + (mkModule (import ./go { + go = pkgs.go_1_17; + })) + (mkModule ./apl) (mkModule ./bash) (mkModule ./basic) @@ -82,7 +89,6 @@ let (mkLegacyModule ./erlang) (mkLegacyModule ./forth) (mkModule ./gcloud) - (mkModule ./go) (mkModule ./haskell) (mkModule ./java) (mkModule ./lua) diff --git a/pkgs/modules/go/default.nix b/pkgs/modules/go/default.nix index efc178d8..a14e8385 100644 --- a/pkgs/modules/go/default.nix +++ b/pkgs/modules/go/default.nix @@ -1,21 +1,21 @@ +{ go }: { pkgs, lib, ... }: let - goversion = lib.versions.majorMinor pkgs.go.version; + goversion = lib.versions.majorMinor go.version; in { id = "go-${goversion}"; name = "Go Tools"; - packages = with pkgs; [ + packages = [ go - gopls ]; replit.runners.go-run = { name = "go run"; language = "go"; - start = "${pkgs.go}/bin/go run $file"; + start = "${go}/bin/go run $file"; fileParam = true; }; @@ -23,7 +23,7 @@ in name = "go fmt"; language = "go"; - start = "${pkgs.go}/bin/go fmt"; + start = "${go}/bin/go fmt"; stdin = false; };