raceless go is a nicer go
This commit is contained in:
@@ -99,7 +99,7 @@
|
||||
# };
|
||||
# deploy-rs-pkg = null;
|
||||
#})
|
||||
(_: super: {
|
||||
(_: super: rec {
|
||||
gamja = super.callPackage ./pkgs/gamja.nix { };
|
||||
weather = super.callPackage ./pkgs/weather { };
|
||||
nicer = super.callPackage ./pkgs/nicer.nix { };
|
||||
@@ -108,7 +108,7 @@
|
||||
chronoctl = super.callPackage ./pkgs/chronoctl.nix { };
|
||||
vanta-agent = super.callPackage ./pkgs/vanta-agent.nix { };
|
||||
gcloud-wrapped = super.callPackage ./pkgs/gcloud-wrapped { };
|
||||
go-raceless = super.callPackage ./pkgs/go-raceless { };
|
||||
go-raceless = super.callPackage ./pkgs/go-raceless { inherit (nicer) ; };
|
||||
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit (super) system;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ pkgs, go }:
|
||||
{
|
||||
pkgs,
|
||||
go,
|
||||
nicer,
|
||||
}:
|
||||
let
|
||||
go-script = pkgs.writeShellScript "go-raceless" ''
|
||||
args=("$@")
|
||||
@@ -22,11 +26,11 @@ let
|
||||
done
|
||||
|
||||
if [[ "$found_race" == "true" ]]; then
|
||||
exec ${go}/bin/go "''${new_args[@]}"
|
||||
exec ${nicer}/bin/nicer ${go}/bin/go "''${new_args[@]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
exec ${go}/bin/go "$@"
|
||||
exec ${nicer}/bin/nicer ${go}/bin/go "$@"
|
||||
'';
|
||||
|
||||
preservedAttrs = pkgs.lib.attrsets.getAttrs [
|
||||
|
||||
@@ -134,6 +134,7 @@ in
|
||||
builtins.readFile
|
||||
(pkgs.replaceVars ./dev.lua {
|
||||
inherit (pkgs) ripgrep;
|
||||
inherit (pkgs.pkgs-unstable) gopls;
|
||||
}).outPath;
|
||||
})
|
||||
];
|
||||
|
||||
@@ -3,7 +3,7 @@ require'lspconfig'.clangd.setup{
|
||||
}
|
||||
|
||||
require'lspconfig'.gopls.setup{
|
||||
cmd = { "nicer", "gopls" }
|
||||
cmd = { "nicer", "@gopls@/bin/gopls" }
|
||||
}
|
||||
|
||||
vim.api.nvim_exec([[
|
||||
|
||||
Reference in New Issue
Block a user