v86d: refactor

This commit is contained in:
codyopel 2015-04-25 17:36:56 -04:00
parent 991a23b5db
commit 2421b139bc

View File

@ -1,32 +1,38 @@
{stdenv, fetchurl, klibc, kernel, withKlibc ? true}:
{ stdenv, fetchurl
, kernel, klibc
}:
stdenv.mkDerivation rec {
name = "v86d-${version}-${kernel.version}";
version = "0.1.10";
src = fetchurl {
url = "mirror://gentoo/distfiles//v86d-${version}.tar.bz2";
sha256 = "0p3kwqjis941pns9948dxfnjnl5lwd8f2b6x794whs7g32p68jb3";
url = "https://github.com/mjanusz/v86d/archive/v86d-${version}.tar.gz";
sha256 = "1flnpp8rc945cxr6jr9dlm8mi8gr181zrp2say4269602s1a4ymg";
};
buildInputs = stdenv.lib.optional withKlibc klibc;
configurePhase = ''
bash ./configure $configureFlags
patchPhase = ''
patchShebangs configure
'';
configureFlags = if withKlibc then [ "--with-klibc" ] else [ "--default" ];
configureFlags = [ "--with-klibc" "--with-x86emu" ];
makeFlags = [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
"DESTDIR=$(out)"
];
meta = {
description = "A userspace helper that runs x86 code in an emulated environment";
homepage = http://dev.gentoo.org/~spock/projects/uvesafb/;
license = stdenv.lib.licenses.gpl2;
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 ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}