{ pkgs, kernel ? pkgs.linux, ... } : with pkgs; let version = "master"; kdir="${kernel.dev}/lib/modules/${kernel.modDirVersion}"; in stdenv.mkDerivation { inherit version; name = "xpmem-${version}-${kernel.version}"; src = fetchgit { name = "xpmem-${version}"; url = "https://github.com/hpc/xpmem.git"; sha256 = "sha256-lB4adWBLhaj32Ll11jWPuCJSuKF8EVBG9L1Pk8HIbzY="; }; hardeningDisable = [ "fortify" "pic" "stackprotector" ]; nativeBuildInputs = [ which kmod ]; buildInputs = kernel.moduleBuildDependencies ++ [ libtool autoconf pkgconf automake hwloc ] ; preConfigurePhases = "preConfigure"; preConfigure = '' autoupdate ./autogen.sh ''; configureFlags = [ "--with-kerneldir=${kdir}/source" ]; installPhase = '' make install rm -rf $out/etc $out/sbin ''; }