laravel-ls/shell.nix
Alan Daniels fd97122894 update & alias
just `gomod2nix` should work now
2025-07-24 08:38:50 +10:00

25 lines
548 B
Nix

{
source,
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in
import (fetchTree nixpkgs.locked) {
overlays = [
(import "${fetchTree gomod2nix.locked}/overlay.nix")
];
}
),
mkGoEnv ? pkgs.mkGoEnv,
gomod2nix ? pkgs.gomod2nix,
}:
pkgs.mkShell {
buildInputs = [
gomod2nix
];
shellHook = ''
alias gomod2nix='${gomod2nix}/bin/gomod2nix --dir ${source} --outdir ./'
'';
packages = [];
}