2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2009-10-24 20:58:07 +01:00
|
|
|
|
2015-04-25 15:55:47 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "libx86";
|
2015-04-25 15:55:47 +01:00
|
|
|
version = "1.1";
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://www.codon.org.uk/~mjg59/libx86/downloads/${pname}-${version}.tar.gz";
|
2015-04-25 15:55:47 +01:00
|
|
|
sha256 = "0j6h6bc02c6qi0q7c1ncraz4d1hkm5936r35rfsp4x1jrc233wav";
|
|
|
|
};
|
|
|
|
patches = [./constants.patch ./non-x86.patch ];
|
2011-04-16 23:47:15 +01:00
|
|
|
|
2011-04-17 00:00:47 +01:00
|
|
|
# using BACKEND=x86emu on 64bit systems fixes:
|
|
|
|
# http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html
|
2009-10-24 20:58:07 +01:00
|
|
|
makeFlags = [
|
2015-04-25 15:55:47 +01:00
|
|
|
"DESTDIR=$(out)"
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optional (!stdenv.isi686) "BACKEND=x86emu";
|
2011-04-17 00:00:47 +01:00
|
|
|
|
2015-04-25 15:55:47 +01:00
|
|
|
preBuild = ''
|
2010-11-10 17:32:08 +00:00
|
|
|
sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@'
|
2009-10-24 20:58:07 +01:00
|
|
|
sed -e s@/usr@@ -i Makefile
|
2015-04-25 15:55:47 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2009-10-24 20:58:07 +01:00
|
|
|
description = "Real-mode x86 code emulator";
|
2015-04-25 15:55:47 +01:00
|
|
|
maintainers = with maintainers; [ raskin ];
|
2017-10-22 21:43:56 +01:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2015-04-25 15:55:47 +01:00
|
|
|
license = licenses.mit;
|
2009-10-24 20:58:07 +01:00
|
|
|
};
|
|
|
|
}
|