Experimental GDB stage
This commit is contained in:
parent
a227084e39
commit
35f4ba545a
30
garlic/stages/pgdb.nix
Normal file
30
garlic/stages/pgdb.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
stdenv
|
||||
, bash
|
||||
, screen
|
||||
, gdb
|
||||
}:
|
||||
|
||||
{
|
||||
program
|
||||
, gdbArgs ? "-ex run"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "pgdb";
|
||||
preferLocalBuild = true;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
cat > $out <<EOF
|
||||
#!/bin/sh
|
||||
|
||||
exec ${screen}/bin/screen -D -m \
|
||||
${gdb}/bin/gdb \
|
||||
-ex 'set pagination off' \
|
||||
${gdbArgs} \
|
||||
--args ${program} \$@
|
||||
|
||||
EOF
|
||||
chmod +x $out
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user