From 3a34767c9bcfeea7809be5284202381c1ae3e675 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 4 Jun 2022 04:20:00 +0000 Subject: [PATCH 1/2] smatch: 20120924 -> 1.72 --- .../tools/analysis/smatch/default.nix | 43 +++++++++++-------- pkgs/top-level/all-packages.nix | 5 +-- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/pkgs/development/tools/analysis/smatch/default.nix b/pkgs/development/tools/analysis/smatch/default.nix index 82a32504d73a..b22c1c4411fa 100644 --- a/pkgs/development/tools/analysis/smatch/default.nix +++ b/pkgs/development/tools/analysis/smatch/default.nix @@ -1,34 +1,39 @@ -{ lib, stdenv, fetchgit, sqlite, pkg-config, perl -, buildllvmsparse ? true -, buildc2xml ? true -, llvm, libxml2 +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, sqlite +, openssl +, buildllvmsparse ? false +, buildc2xml ? false +, libllvm +, libxml2 }: stdenv.mkDerivation rec { pname = "smatch"; - version = "20120924"; + version = "1.72"; - src = fetchgit { - url = "git://repo.or.cz/${pname}.git"; - rev = "23656e3e578b700cbf96d043f039e6341a3ba5b9"; - sha256 = "0r43qi6vryqg450fj73yjwbb7gzcgx64rhrhb3r1m6a252srijiy"; + src = fetchFromGitHub { + owner = "error27"; + repo = "smatch"; + rev = version; + sha256 = "sha256-XVW4sAgIxaJjAk75bp/O286uddIfgfKtIA2LniUGWBM="; }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ sqlite perl ] - ++ lib.optional buildllvmsparse llvm - ++ lib.optional buildc2xml libxml2; - preBuild = '' - sed -i Makefile \ - -e "s|^PREFIX=.*|PREFIX = $out|g" - ''; + buildInputs = [ sqlite openssl ] + ++ lib.optionals buildllvmsparse [ libllvm ] + ++ lib.optionals buildc2xml [ libxml2.dev ]; + + makeFlags = [ "PREFIX=${placeholder "out"}" "CXX=${stdenv.cc.targetPrefix}c++" ]; meta = with lib; { description = "A semantic analysis tool for C"; homepage = "http://smatch.sourceforge.net/"; - maintainers = with maintainers; []; - license = licenses.free; /* OSL, see http://www.opensource.org */ - platforms = platforms.linux; + maintainers = with maintainers; [ ]; + license = licenses.gpl2Plus; + platforms = platforms.all; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 51b8eb6f2688..1f22502e4e9a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16208,10 +16208,7 @@ with pkgs; sloc = nodePackages.sloc; - smatch = callPackage ../development/tools/analysis/smatch { - buildllvmsparse = false; - buildc2xml = false; - }; + smatch = callPackage ../development/tools/analysis/smatch { }; smc = callPackage ../tools/misc/smc { }; From cb90b5a8e42e674852dbe2c4f864fca2bd84e50a Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 4 Jun 2022 04:20:00 +0000 Subject: [PATCH 2/2] smatch: add marsam to maintainers --- pkgs/development/tools/analysis/smatch/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/analysis/smatch/default.nix b/pkgs/development/tools/analysis/smatch/default.nix index b22c1c4411fa..ff7462091069 100644 --- a/pkgs/development/tools/analysis/smatch/default.nix +++ b/pkgs/development/tools/analysis/smatch/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A semantic analysis tool for C"; homepage = "http://smatch.sourceforge.net/"; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ marsam ]; license = licenses.gpl2Plus; platforms = platforms.all; };