nixpkgs/pkgs/os-specific/linux/v86d/default.nix
Franz Pletz aff1f4ab94 Use general hardening flag toggle lists
The following parameters are now available:

  * hardeningDisable
    To disable specific hardening flags
  * hardeningEnable
    To enable specific hardening flags

Only the cc-wrapper supports this right now, but these may be reused by
other wrappers, builders or setup hooks.

cc-wrapper supports the following flags:

  * fortify
  * stackprotector
  * pie (disabled by default)
  * pic
  * strictoverflow
  * format
  * relro
  * bindnow
2016-03-05 18:55:26 +01:00

41 lines
941 B
Nix

{ stdenv, fetchurl
, kernel, klibc
}:
stdenv.mkDerivation rec {
name = "v86d-${version}-${kernel.version}";
version = "0.1.10";
src = fetchurl {
url = "https://github.com/mjanusz/v86d/archive/v86d-${version}.tar.gz";
sha256 = "1flnpp8rc945cxr6jr9dlm8mi8gr181zrp2say4269602s1a4ymg";
};
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 ];
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" ];
};
}