1{ stdenv, fetchurl
2, kernel, klibc
3}:
4
5stdenv.mkDerivation rec {
6 name = "v86d-${version}-${kernel.version}";
7 version = "0.1.10";
8
9 src = fetchurl {
10 url = "https://github.com/mjanusz/v86d/archive/v86d-${version}.tar.gz";
11 sha256 = "1flnpp8rc945cxr6jr9dlm8mi8gr181zrp2say4269602s1a4ymg";
12 };
13
14 patchPhase = ''
15 patchShebangs configure
16 '';
17
18 configureFlags = [ "--with-klibc" "--with-x86emu" ];
19
20 hardeningDisable = [ "stackprotector" ];
21
22 makeFlags = [
23 "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
24 "DESTDIR=$(out)"
25 ];
26
27 configurePhase = ''
28 ./configure $configureFlags
29 '';
30
31 buildInputs = [ klibc ];
32
33 meta = with stdenv.lib; {
34 description = "A daemon to run x86 code in an emulated environment";
35 homepage = https://github.com/mjanusz/v86d;
36 license = licenses.gpl2;
37 maintainers = with maintainers; [ codyopel ];
38 platforms = [ "i686-linux" "x86_64-linux" ];
39 };
40}