2014-04-09 01:21:06 +01:00
|
|
|
{ stdenv, fetchurl }:
|
2014-04-01 07:10:28 +01:00
|
|
|
|
2014-04-09 01:21:06 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "lockdep-${version}";
|
2014-10-09 22:56:09 +01:00
|
|
|
version = "3.17";
|
|
|
|
fullver = "3.17.0"; # The library ver is 3.17.0, but the kernel is 3.17
|
2014-04-09 01:21:06 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
|
2014-10-09 22:56:09 +01:00
|
|
|
sha256 = "0lb2yyh3j932789jq4gxx9xshgy6rfdnl3lm8yr43kaz7k4kw5gm";
|
2014-04-09 01:21:06 +01:00
|
|
|
};
|
2014-04-01 07:10:28 +01:00
|
|
|
|
|
|
|
preConfigure = "cd tools/lib/lockdep";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib $out/include
|
|
|
|
|
|
|
|
cp -R include/liblockdep $out/include
|
|
|
|
make install DESTDIR=$out prefix=""
|
|
|
|
|
2014-10-09 22:56:09 +01:00
|
|
|
substituteInPlace $out/bin/lockdep --replace "./liblockdep.so" "$out/lib/liblockdep.so.$fullver"
|
2014-04-01 07:10:28 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2014-04-09 01:21:06 +01:00
|
|
|
description = "userspace locking validation tool built on the Linux kernel";
|
2014-04-01 07:10:28 +01:00
|
|
|
homepage = "https://kernel.org/";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|