From 5775580fca61a7301d59a5a572d37a21367c8c2e Mon Sep 17 00:00:00 2001
From: Sandro <sandro.jaeckel@gmail.com>
Date: Tue, 29 Jun 2021 23:43:02 +0200
Subject: [PATCH] smatch: cleanup

---
 .../tools/analysis/smatch/default.nix         | 25 +++++++++----------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/pkgs/development/tools/analysis/smatch/default.nix b/pkgs/development/tools/analysis/smatch/default.nix
index 4330ec3d7426..2780c8552fc0 100644
--- a/pkgs/development/tools/analysis/smatch/default.nix
+++ b/pkgs/development/tools/analysis/smatch/default.nix
@@ -1,14 +1,12 @@
 { lib, stdenv, fetchgit, sqlite, pkg-config, perl
 , buildllvmsparse ? true
 , buildc2xml ? true
-, llvm ? null, libxml2 ? null
+, llvm, libxml2
 }:
 
-assert buildllvmsparse -> llvm != null;
-assert buildc2xml -> libxml2 != null;
-
 stdenv.mkDerivation {
-  name = "smatch-20120924";
+  pname = "smatch";
+  version = "20120924";
 
   src = fetchgit {
     url = "git://repo.or.cz/smatch.git";
@@ -17,19 +15,20 @@ stdenv.mkDerivation {
   };
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [sqlite perl]
+  buildInputs = [ sqlite perl ]
    ++ lib.optional buildllvmsparse llvm
    ++ lib.optional buildc2xml libxml2;
 
-  preBuild =
-    '' sed -i Makefile \
-           -e "s|^PREFIX=.*|PREFIX = $out|g"
-    '';
+  preBuild = ''
+    sed -i Makefile \
+      -e "s|^PREFIX=.*|PREFIX = $out|g"
+  '';
 
-  meta = {
+  meta = with lib; {
     description = "A semantic analysis tool for C";
     homepage = "http://smatch.sourceforge.net/";
-    license = lib.licenses.free; /* OSL, see http://www.opensource.org */
-    platforms = lib.platforms.linux;
+    maintainers = with maintainers; [];
+    license = licenses.free; /* OSL, see http://www.opensource.org */
+    platforms = platforms.linux;
   };
 }