Skip to content

Commit

Permalink
devshells: Add Delve for debugging (#77)
Browse files Browse the repository at this point in the history
Add Delve to the devshells; Disable nix hardening for fortify otherwize
delve does not start. See:
https://wiki.nixos.org/wiki/Go#Using_cgo_on_NixOS
  • Loading branch information
kalbasit authored Dec 12, 2024
1 parent 586f508 commit 493b3cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nix/devshells/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.dbmate
pkgs.delve
pkgs.go
pkgs.golangci-lint
pkgs.sqlc
Expand All @@ -13,6 +14,9 @@
_GO_VERSION = "${pkgs.go.version}";
_DBMATE_VERSION = "${pkgs.dbmate.version}";

# Disable hardening for fortify otherwize it's not possible to use Delve.
hardeningDisable = [ "fortify" ];

shellHook = ''
${config.pre-commit.installationScript}
Expand Down

0 comments on commit 493b3cf

Please sign in to comment.