Merge pull request #7574 from codyopel/v86d

v86d: refactor
This commit is contained in:
William A. Kennington III 2015-04-25 23:35:15 -07:00
commit 954b8a4cdb

View File

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