mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
open-watcom-bin: do an unattended instead of a scripted install
This commit is contained in:
parent
fb6cb137b6
commit
1117016a45
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenvNoCC, fetchurl, qemu, expect, writeScript, writeScriptBin, ncurses, bash, coreutils }:
|
{ lib, stdenvNoCC, fetchurl, qemu, writeScript, writeScriptBin, ncurses, bash, coreutils, unixtools }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -48,41 +48,6 @@ let
|
|||||||
exec ${wrapLegacyBinary} "$TARGET-unwrapped" "$TARGET"
|
exec ${wrapLegacyBinary} "$TARGET-unwrapped" "$TARGET"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Do a scripted installation of OpenWatcom with its original installer.
|
|
||||||
#
|
|
||||||
# If maintaining this expect script turns out to be too much of a
|
|
||||||
# hassle, we can switch to just using `unzip' on the installer and
|
|
||||||
# the correct file permissions manually.
|
|
||||||
performInstall = writeScriptBin "performInstall" ''
|
|
||||||
#!${expect}/bin/expect -f
|
|
||||||
|
|
||||||
spawn [lindex $argv 0]
|
|
||||||
|
|
||||||
# Wait for button saying "I agree" with escape sequences.
|
|
||||||
expect "gree"
|
|
||||||
|
|
||||||
# Navigate to "I Agree!" and hit enter.
|
|
||||||
send "\t\t\n"
|
|
||||||
|
|
||||||
expect "Install Open Watcom"
|
|
||||||
|
|
||||||
# Where do we want to install to.
|
|
||||||
send "$env(out)\n"
|
|
||||||
|
|
||||||
expect "will be installed"
|
|
||||||
|
|
||||||
# Select Full Installation, Next
|
|
||||||
send "fn"
|
|
||||||
|
|
||||||
expect "Setup will now copy"
|
|
||||||
|
|
||||||
# Next
|
|
||||||
send "n"
|
|
||||||
|
|
||||||
expect "completed successfully"
|
|
||||||
send "\n"
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "${passthru.prettyName}-unwrapped";
|
pname = "${passthru.prettyName}-unwrapped";
|
||||||
@ -93,7 +58,7 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
sha256 = "1wzkvc6ija0cjj5mcyjng5b7hnnc5axidz030c0jh05pgvi4nj7p";
|
sha256 = "1wzkvc6ija0cjj5mcyjng5b7hnnc5axidz030c0jh05pgvi4nj7p";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ wrapInPlace performInstall ];
|
nativeBuildInputs = [ wrapInPlace unixtools.script ];
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
@ -104,7 +69,9 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
performInstall ./install-bin-unwrapped
|
# Command line options to do an unattended install are documented in
|
||||||
|
# https://github.com/open-watcom/open-watcom-v2/blob/master/bld/setupgui/setup.txt
|
||||||
|
script -c "./install-bin-unwrapped -dDstDir=$out -dFullInstall=1 -i"
|
||||||
|
|
||||||
for e in $(find $out/binl -type f -executable); do
|
for e in $(find $out/binl -type f -executable); do
|
||||||
echo "Wrapping $e"
|
echo "Wrapping $e"
|
||||||
|
Loading…
Reference in New Issue
Block a user