From 2421b139bcc6ec4f3025e6d4e9d2dcec0707e6bb Mon Sep 17 00:00:00 2001 From: codyopel Date: Sat, 25 Apr 2015 17:36:56 -0400 Subject: [PATCH] v86d: refactor --- pkgs/os-specific/linux/v86d/default.nix | 32 +++++++++++++++---------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/pkgs/os-specific/linux/v86d/default.nix b/pkgs/os-specific/linux/v86d/default.nix index f7e0c5ca5e22..0ef992a4b44c 100644 --- a/pkgs/os-specific/linux/v86d/default.nix +++ b/pkgs/os-specific/linux/v86d/default.nix @@ -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" ]; }; } -