summary refs log tree commit diff
path: root/pkgs/os-specific/linux/lockdep
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2014-04-08 19:21:06 -0500
committerAustin Seipp <aseipp@pobox.com>2014-04-08 19:21:55 -0500
commit3ff158289a22a259db35abd80e317be7e34b32b8 (patch)
tree1432eac84d5c740cc6da4aaab41d985c9e686ea5 /pkgs/os-specific/linux/lockdep
parent452a1f9318ef3baeb967b648b439e0de10e41b88 (diff)
downloadnixpkgs-3ff158289a22a259db35abd80e317be7e34b32b8.tar
nixpkgs-3ff158289a22a259db35abd80e317be7e34b32b8.tar.gz
nixpkgs-3ff158289a22a259db35abd80e317be7e34b32b8.tar.bz2
nixpkgs-3ff158289a22a259db35abd80e317be7e34b32b8.tar.lz
nixpkgs-3ff158289a22a259db35abd80e317be7e34b32b8.tar.xz
nixpkgs-3ff158289a22a259db35abd80e317be7e34b32b8.tar.zst
nixpkgs-3ff158289a22a259db35abd80e317be7e34b32b8.zip
lockdep: refactor into non-kernel package
Lockdep doesn't *really* require the kernel package - just the kernel
sources. It's really a user-space tool just compiled from some portable
code within the kernel, nothing more.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/os-specific/linux/lockdep')
-rw-r--r--pkgs/os-specific/linux/lockdep/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/lockdep/default.nix b/pkgs/os-specific/linux/lockdep/default.nix
new file mode 100644
index 00000000000..77cb43a7b53
--- /dev/null
+++ b/pkgs/os-specific/linux/lockdep/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name    = "lockdep-${version}";
+  version = "3.14";
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
+    sha256 = "61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa";
+  };
+
+  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=""
+
+    substituteInPlace $out/bin/lockdep --replace "./liblockdep.so" "$out/lib/liblockdep.so"
+  '';
+
+  meta = {
+    description = "userspace locking validation tool built on the Linux kernel";
+    homepage    = "https://kernel.org/";
+    license     = stdenv.lib.licenses.gpl2;
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+  };
+}