2021-09-19 17:08:01 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kernel
|
|
|
|
, klibc
|
2015-04-25 23:36:56 +02:00
|
|
|
}:
|
2011-10-25 11:40:15 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-01-05 02:57:21 +01:00
|
|
|
name = "v86d-${version}-${kernel.version}";
|
2013-01-15 16:42:29 +01:00
|
|
|
version = "0.1.10";
|
2011-10-25 11:40:15 +02:00
|
|
|
|
2021-09-19 17:08:01 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mjanusz";
|
|
|
|
repo = "v86d";
|
|
|
|
rev = "v86d-${version}";
|
|
|
|
hash = "sha256-95LRzVbO/DyddmPwQNNQ290tasCGoQk7FDHlst6LkbA=";
|
2011-10-25 11:40:15 +02:00
|
|
|
};
|
|
|
|
|
2015-04-25 23:36:56 +02:00
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs configure
|
2011-10-25 11:40:15 +02:00
|
|
|
'';
|
|
|
|
|
2015-04-25 23:36:56 +02:00
|
|
|
configureFlags = [ "--with-klibc" "--with-x86emu" ];
|
2011-10-25 11:40:15 +02:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "stackprotector" ];
|
2016-02-12 04:01:00 +01:00
|
|
|
|
2011-10-25 11:40:15 +02:00
|
|
|
makeFlags = [
|
2014-01-05 02:57:21 +01:00
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
|
2011-10-25 11:40:15 +02:00
|
|
|
"DESTDIR=$(out)"
|
|
|
|
];
|
|
|
|
|
2015-04-25 23:36:56 +02:00
|
|
|
configurePhase = ''
|
|
|
|
./configure $configureFlags
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ klibc ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-04-25 23:36:56 +02:00
|
|
|
description = "A daemon to run x86 code in an emulated environment";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/mjanusz/v86d";
|
2015-04-25 23:36:56 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
2011-10-25 11:40:15 +02:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|