1{ fetchurl, stdenv, pkgconfig, libxml2, llvm }: 2 3stdenv.mkDerivation rec { 4 name = "sparse-0.5.0"; 5 6 src = fetchurl { 7 url = "mirror://kernel/software/devel/sparse/dist/${name}.tar.xz"; 8 sha256 = "1mc86jc5xdrdmv17nqj2cam2yqygnj6ar1iqkwsx2y37ij8wy7wj"; 9 }; 10 11 preConfigure = '' 12 sed -i Makefile -e "s|^PREFIX=.*$|PREFIX=$out|g" 13 ''; 14 15 buildInputs = [ pkgconfig libxml2 llvm ]; 16 doCheck = true; 17 18 meta = { 19 description = "Semantic parser for C"; 20 homepage = "https://git.kernel.org/cgit/devel/sparse/sparse.git/"; 21 license = stdenv.lib.licenses.mit; 22 platforms = stdenv.lib.platforms.linux; 23 maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; 24 }; 25}