about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-08-22 18:33:52 +0000
committerLudovic Courtès <ludo@gnu.org>2008-08-22 18:33:52 +0000
commit3328fd9d3d372b6338c92c7ed1349f7f7d46f96e (patch)
tree72793985d381171141739b10764a9cedf9702c98
parenteebb241519615e0e82704ab80aacdd4f510f2555 (diff)
downloadnixlib-3328fd9d3d372b6338c92c7ed1349f7f7d46f96e.tar
nixlib-3328fd9d3d372b6338c92c7ed1349f7f7d46f96e.tar.gz
nixlib-3328fd9d3d372b6338c92c7ed1349f7f7d46f96e.tar.bz2
nixlib-3328fd9d3d372b6338c92c7ed1349f7f7d46f96e.tar.lz
nixlib-3328fd9d3d372b6338c92c7ed1349f7f7d46f96e.tar.xz
nixlib-3328fd9d3d372b6338c92c7ed1349f7f7d46f96e.tar.zst
nixlib-3328fd9d3d372b6338c92c7ed1349f7f7d46f96e.zip
Add Sparse, a static analysis tool for C.
svn path=/nixpkgs/trunk/; revision=12696
-rw-r--r--pkgs/development/tools/analysis/sparse/default.nix38
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/tools/analysis/sparse/default.nix b/pkgs/development/tools/analysis/sparse/default.nix
new file mode 100644
index 000000000000..294c9872e8b2
--- /dev/null
+++ b/pkgs/development/tools/analysis/sparse/default.nix
@@ -0,0 +1,38 @@
+{ fetchurl, stdenv, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "sparse-0.4.1";
+
+  src = fetchurl {
+    url = "mirror://kernel/software/devel/sparse/dist/${name}.tar.gz";
+    sha256 = "18nkgqkqhfp4gdjhdy8xgwxvla5vjccg1kzyz5ngpjw35q0hp5fb";
+  };
+
+  preConfigure = ''
+    sed -i "Makefile" \
+        -e "s|^PREFIX *=.*$|PREFIX = $out|g"
+  '';
+
+  buildInputs = [ pkgconfig ];
+
+  doCheck = true;
+
+  meta = {
+    description = "Sparse, a semantic parser for C";
+
+    longDescription = ''
+      Sparse, the semantic parser, provides a compiler frontend
+      capable of parsing most of ANSI C as well as many GCC
+      extensions, and a collection of sample compiler backends,
+      including a static analyzer also called "sparse".  Sparse
+      provides a set of annotations designed to convey semantic
+      information about types, such as what address space pointers
+      point to, or what locks a function acquires or releases.
+    '';
+
+    homepage = http://www.kernel.org/pub/software/devel/sparse/;
+
+    # See http://www.opensource.org/licenses/osl.php .
+    license = "Open Software License v1.1";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3849f3576559..7ea8289be123 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2361,6 +2361,10 @@ let pkgs = rec {
     stdenv = overrideInStdenv stdenv [gnumake380];
   };
 
+  sparse = import ../development/tools/analysis/sparse {
+    inherit fetchurl stdenv pkgconfig;
+  };
+
   splint = import ../development/tools/analysis/splint {
     inherit fetchurl stdenv flex;
   };