2013-03-24 12:45:00 +01:00
|
|
|
{ fetchurl, stdenv, kernelDev, onlyHeaders ? false }:
|
2012-09-23 20:50:24 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2012-11-29 15:08:29 +01:00
|
|
|
pname = "cryptodev-linux-1.5";
|
2013-03-24 12:45:00 +01:00
|
|
|
name = "${pname}-${kernelDev.version}";
|
2012-09-23 20:50:24 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-11-29 15:08:29 +01:00
|
|
|
url = "http://download.gna.org/cryptodev-linux/${pname}.tar.gz";
|
2012-09-23 20:50:24 +02:00
|
|
|
sha256 = "13hybl5p0ck0vgi2gxmiwa2810gcfk78kdy17ai8nczj8il15mn0";
|
|
|
|
};
|
|
|
|
|
2012-12-28 19:54:15 +01:00
|
|
|
buildPhase = if !onlyHeaders then ''
|
2013-03-24 12:45:00 +01:00
|
|
|
make -C ${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build \
|
2012-09-23 21:41:24 +02:00
|
|
|
SUBDIRS=`pwd` INSTALL_PATH=$out
|
2012-09-23 20:50:24 +02:00
|
|
|
'' else ":";
|
|
|
|
|
|
|
|
installPhase = stdenv.lib.optionalString (!onlyHeaders) ''
|
2013-03-24 12:45:00 +01:00
|
|
|
make -C ${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build \
|
2012-09-23 21:41:24 +02:00
|
|
|
INSTALL_MOD_PATH=$out SUBDIRS=`pwd` modules_install
|
2012-09-23 20:50:24 +02: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+";
|
|
|
|
};
|
|
|
|
}
|