2014-01-05 01:57:21 +00:00
|
|
|
{ fetchurl, stdenv, kernel, onlyHeaders ? false }:
|
2012-09-23 18:50:24 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-11-20 21:13:11 +00:00
|
|
|
pname = "cryptodev-linux-1.6";
|
2014-01-05 01:57:21 +00:00
|
|
|
name = "${pname}-${kernel.version}";
|
2012-09-23 18:50:24 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-11-29 14:08:29 +00:00
|
|
|
url = "http://download.gna.org/cryptodev-linux/${pname}.tar.gz";
|
2013-11-20 21:13:11 +00:00
|
|
|
sha256 = "0bryzdb4xz3fp2q00a0mlqkj629md825lnlh4gjwmy51irf45wbm";
|
2012-09-23 18:50:24 +00:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:54:15 +00:00
|
|
|
buildPhase = if !onlyHeaders then ''
|
2014-01-05 01:57:21 +00:00
|
|
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
|
2012-09-23 19:41:24 +00:00
|
|
|
SUBDIRS=`pwd` INSTALL_PATH=$out
|
2012-09-23 18:50:24 +00:00
|
|
|
'' else ":";
|
|
|
|
|
|
|
|
installPhase = stdenv.lib.optionalString (!onlyHeaders) ''
|
2014-01-05 01:57:21 +00:00
|
|
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
|
2012-09-23 19:41:24 +00:00
|
|
|
INSTALL_MOD_PATH=$out SUBDIRS=`pwd` modules_install
|
2012-09-23 18:50:24 +00:00
|
|
|
'' + ''
|
|
|
|
mkdir -p $out/include/crypto
|
|
|
|
cp crypto/cryptodev.h $out/include/crypto
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Device that allows access to Linux kernel cryptographic drivers";
|
|
|
|
homepage = http://home.gna.org/cryptodev-linux/;
|
|
|
|
license = "GPLv2+";
|
|
|
|
};
|
|
|
|
}
|