2009-10-24 23:58:07 +04: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 20:32:08 +03:00
|
|
|
phaseNames = ["doPatch" "fixX86Def" "killUsr" "doMakeInstall"];
|
2009-10-24 23:58:07 +04:00
|
|
|
patches = [./constants.patch];
|
2011-04-17 02:47:15 +04:00
|
|
|
|
2011-04-17 03:00:47 +04:00
|
|
|
# using BACKEND=x86emu on 64bit systems fixes:
|
|
|
|
# http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html
|
2009-10-24 23:58:07 +04:00
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$out"
|
2011-04-17 03:00:47 +04:00
|
|
|
] ++ a.stdenv.lib.optionals ( a.stdenv.system == "x86_64-linux" ) [ "BACKEND=x86emu" ];
|
|
|
|
|
2010-11-10 20:32:08 +03:00
|
|
|
fixX86Def = a.fullDepEntry (''
|
|
|
|
sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@'
|
|
|
|
'') ["doUnpack" "minInit"];
|
2009-10-24 23:58:07 +04: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;
|
|
|
|
};
|
|
|
|
}
|