2009-10-24 21:58:07 +02:00
|
|
|
a :
|
|
|
|
let
|
|
|
|
s = import ./src-for-default.nix;
|
|
|
|
buildInputs = with a; [
|
|
|
|
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = a.fetchUrlFromSrcInfo s;
|
|
|
|
|
|
|
|
inherit (s) name;
|
|
|
|
inherit buildInputs;
|
|
|
|
|
2010-11-10 18:32:08 +01:00
|
|
|
phaseNames = ["doPatch" "fixX86Def" "killUsr" "doMakeInstall"];
|
2009-10-24 21:58:07 +02:00
|
|
|
patches = [./constants.patch];
|
2011-04-17 00:47:15 +02:00
|
|
|
|
2011-04-17 01:00:47 +02:00
|
|
|
# using BACKEND=x86emu on 64bit systems fixes:
|
|
|
|
# http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html
|
2009-10-24 21:58:07 +02:00
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$out"
|
2011-04-17 01:00:47 +02:00
|
|
|
] ++ a.stdenv.lib.optionals ( a.stdenv.system == "x86_64-linux" ) [ "BACKEND=x86emu" ];
|
|
|
|
|
2010-11-10 18:32:08 +01:00
|
|
|
fixX86Def = a.fullDepEntry (''
|
|
|
|
sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@'
|
|
|
|
'') ["doUnpack" "minInit"];
|
2009-10-24 21:58:07 +02:00
|
|
|
killUsr = a.fullDepEntry (''
|
|
|
|
sed -e s@/usr@@ -i Makefile
|
|
|
|
'') ["doUnpack" "minInit"];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Real-mode x86 code emulator";
|
|
|
|
maintainers = [
|
|
|
|
a.lib.maintainers.raskin
|
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux ++ freebsd ++ netbsd;
|
|
|
|
};
|
|
|
|
}
|