mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 13:39:15 +03:00
* Urgh, socat ignores SIGCHLD, which causes Nix builds to fail.
svn path=/nixos/trunk/; revision=19270
This commit is contained in:
parent
99644df67a
commit
bb236f99de
1 changed files with 16 additions and 2 deletions
|
@ -5,6 +5,19 @@
|
||||||
|
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
# Urgh, `socat' sets the SIGCHLD to ignore. This wreaks havoc with
|
||||||
|
# some programs.
|
||||||
|
rootShell = pkgs.writeScript "shell.pl"
|
||||||
|
''
|
||||||
|
#! ${pkgs.perl}/bin/perl
|
||||||
|
$SIG{CHLD} = 'DEFAULT';
|
||||||
|
exec "/bin/sh";
|
||||||
|
'';
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -20,12 +33,13 @@ with pkgs.lib;
|
||||||
|
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
|
export USER=root
|
||||||
export HOME=/root
|
export HOME=/root
|
||||||
export DISPLAY=:0.0
|
export DISPLAY=:0.0
|
||||||
export GCOV_PREFIX=/tmp/coverage-data
|
export GCOV_PREFIX=/tmp/coverage-data
|
||||||
source /etc/bashrc
|
source /etc/profile
|
||||||
cd /tmp
|
cd /tmp
|
||||||
exec ${pkgs.socat}/bin/socat tcp-listen:514,fork exec:/bin/sh 2> /dev/ttyS0
|
exec ${pkgs.socat}/bin/socat tcp-listen:514,fork exec:${rootShell} 2> /dev/ttyS0
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue