2015-04-25 22:36:56 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, kernel, klibc
|
|
|
|
}:
|
2011-10-25 10:40:15 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-01-05 01:57:21 +00:00
|
|
|
name = "v86d-${version}-${kernel.version}";
|
2013-01-15 15:42:29 +00:00
|
|
|
version = "0.1.10";
|
2011-10-25 10:40:15 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-04-25 22:36:56 +01:00
|
|
|
url = "https://github.com/mjanusz/v86d/archive/v86d-${version}.tar.gz";
|
|
|
|
sha256 = "1flnpp8rc945cxr6jr9dlm8mi8gr181zrp2say4269602s1a4ymg";
|
2011-10-25 10:40:15 +01:00
|
|
|
};
|
|
|
|
|
2015-04-25 22:36:56 +01:00
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs configure
|
2011-10-25 10:40:15 +01:00
|
|
|
'';
|
|
|
|
|
2015-04-25 22:36:56 +01:00
|
|
|
configureFlags = [ "--with-klibc" "--with-x86emu" ];
|
2011-10-25 10:40:15 +01:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "stackprotector" ];
|
2016-02-12 03:01:00 +00:00
|
|
|
|
2011-10-25 10:40:15 +01:00
|
|
|
makeFlags = [
|
2014-01-05 01:57:21 +00:00
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
|
2011-10-25 10:40:15 +01:00
|
|
|
"DESTDIR=$(out)"
|
|
|
|
];
|
|
|
|
|
2015-04-25 22:36:56 +01:00
|
|
|
configurePhase = ''
|
|
|
|
./configure $configureFlags
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ klibc ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A daemon to run x86 code in an emulated environment";
|
|
|
|
homepage = https://github.com/mjanusz/v86d;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
2011-10-25 10:40:15 +01:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|