Merge pull request #54 from jsoo1/add-debug-symbols-to-shell

Add debug symbols to nix-shell.
This commit is contained in:
adisbladis 2022-04-22 13:52:08 +07:00 committed by GitHub
commit 01dd2d0133
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,9 +13,13 @@
, srcDir ? null , srcDir ? null
}: }:
(pkgs.callPackage ./default.nix { let
inherit srcDir; inherit (pkgs) lib stdenv;
nix = pkgs.nixUnstable; nix = pkgs.nixUnstable;
in
(pkgs.callPackage ./default.nix {
inherit nix srcDir;
}).overrideAttrs (old: { }).overrideAttrs (old: {
src = null; src = null;
@ -32,4 +36,7 @@
]; ];
shellHook = lib.optionalString stdenv.isLinux ''
export NIX_DEBUG_INFO_DIRS="${pkgs.curl.debug}/lib/debug:${nix.debug}/lib/debug''${NIX_DEBUG_INFO_DIRS:+:$NIX_DEBUG_INFO_DIRS}"
'';
}) })