2021-09-23 15:35:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kernel
|
|
|
|
, klibc
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
let
|
|
|
|
pversion = "0.1.10";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "v86d";
|
|
|
|
version = "${pversion}-${kernel.version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mjanusz";
|
|
|
|
repo = "v86d";
|
2021-12-26 17:43:05 +00:00
|
|
|
rev = "v86d-${pversion}";
|
2021-09-23 15:35:13 +00:00
|
|
|
hash = "sha256-95LRzVbO/DyddmPwQNNQ290tasCGoQk7FDHlst6LkbA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--with-klibc" "--with-x86emu" ];
|
|
|
|
|
|
|
|
hardeningDisable = [ "stackprotector" ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
./configure $configureFlags
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ klibc ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A daemon to run x86 code in an emulated environment";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "v86d";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/mjanusz/v86d";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|