2021-09-19 16:08:01 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kernel
|
|
|
|
, klibc
|
2015-04-25 22:36:56 +01:00
|
|
|
}:
|
2011-10-25 10:40:15 +01:00
|
|
|
|
2021-12-07 19:40:23 +00:00
|
|
|
let
|
|
|
|
pversion = "0.1.10";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "v86d";
|
|
|
|
version = "${pversion}-${kernel.version}";
|
2011-10-25 10:40:15 +01:00
|
|
|
|
2021-09-19 16:08:01 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mjanusz";
|
|
|
|
repo = "v86d";
|
2021-12-07 19:40:23 +00:00
|
|
|
rev = "v86d-${pversion}";
|
2021-09-19 16:08:01 +01:00
|
|
|
hash = "sha256-95LRzVbO/DyddmPwQNNQ290tasCGoQk7FDHlst6LkbA=";
|
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 ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-04-25 22:36:56 +01:00
|
|
|
description = "A daemon to run x86 code in an emulated environment";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/mjanusz/v86d";
|
2015-04-25 22:36:56 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
2011-10-25 10:40:15 +01:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|