Skip to content

Commit

Permalink
go
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmistman committed Aug 31, 2023
1 parent 06384e3 commit 750f2b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion pkgs/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -82,7 +89,6 @@ let
(mkLegacyModule ./erlang)
(mkLegacyModule ./forth)
(mkModule ./gcloud)
(mkModule ./go)
(mkModule ./haskell)
(mkModule ./java)
(mkModule ./lua)
Expand Down
10 changes: 5 additions & 5 deletions pkgs/modules/go/default.nix
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{ 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;
};

replit.formatters.go-fmt = {
name = "go fmt";
language = "go";

start = "${pkgs.go}/bin/go fmt";
start = "${go}/bin/go fmt";
stdin = false;
};

Expand Down

0 comments on commit 750f2b5

Please sign in to comment.