raceless go is a nicer go

This commit is contained in:
2025-11-26 09:13:03 +00:00
parent 8aaa536a2a
commit cc2c9b948b
4 changed files with 11 additions and 6 deletions

View File

@@ -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;

View File

@@ -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 [

View File

@@ -134,6 +134,7 @@ in
builtins.readFile
(pkgs.replaceVars ./dev.lua {
inherit (pkgs) ripgrep;
inherit (pkgs.pkgs-unstable) gopls;
}).outPath;
})
];

View File

@@ -3,7 +3,7 @@ require'lspconfig'.clangd.setup{
}
require'lspconfig'.gopls.setup{
cmd = { "nicer", "gopls" }
cmd = { "nicer", "@gopls@/bin/gopls" }
}
vim.api.nvim_exec([[