diff --git a/nix/frama-c-checkers-shell.nix b/nix/frama-c-checkers-shell.nix index de0483335050f1ba782ec032815c3c65804e1f3b..40a0406a77685de48266658d19caeb00488df77f 100644 --- a/nix/frama-c-checkers-shell.nix +++ b/nix/frama-c-checkers-shell.nix @@ -2,6 +2,7 @@ , stdenv , clang_10 , frama-c-hdrck +, frama-c-lint , git , git-lfs , gnumake @@ -13,6 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ clang_10 frama-c-hdrck + frama-c-lint git git-lfs gnumake diff --git a/nix/frama-c-lint.nix b/nix/frama-c-lint.nix new file mode 100644 index 0000000000000000000000000000000000000000..d33b25870079d5d24d2ba1a685ac8b1b3a203d82 --- /dev/null +++ b/nix/frama-c-lint.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, camomile +, dune_3 +, findlib +, gitignoreSource +, ocaml +, ocp-indent +} : + +stdenv.mkDerivation rec { + pname = "frama-c-lint"; + version = + lib.strings.replaceStrings ["~"] ["-"] + (lib.strings.removeSuffix "\n" + (builtins.readFile ../VERSION)); + slang = lib.strings.removeSuffix "\n" (builtins.readFile ../VERSION_CODENAME); + + src = gitignoreSource ./../tools/lint ; + + buildInputs = [ + camomile + dune_3 + findlib + ocaml + ocp-indent + ]; + + configurePhase = '' + true + ''; + + buildPhase = '' + dune build --root . + ''; + + installPhase = '' + dune install --prefix $out --root . + ''; +} diff --git a/nix/ocp-indent.nix b/nix/ocp-indent.nix index 089d6ac9b6dc8049477d520e8fbfc8a5fba391e9..395c663ae31eda896f4d25b91ddd035d071b5134 100644 --- a/nix/ocp-indent.nix +++ b/nix/ocp-indent.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, findlib , buildDunePackage , cmdliner }: @@ -18,7 +19,7 @@ buildDunePackage rec { minimumOCamlVersion = "4.02"; useDune2 = true; - buildInputs = [ cmdliner ]; + buildInputs = [ cmdliner findlib ]; meta = with lib; { homepage = http://typerex.ocamlpro.com/ocp-indent.html; diff --git a/nix/pkgs.nix b/nix/pkgs.nix index 522be707e117795dfd820ffac5c6b68f8cbf030d..113c31eac7b511a4c92b08d322069ab4042b8940 100644 --- a/nix/pkgs.nix +++ b/nix/pkgs.nix @@ -28,6 +28,7 @@ let # Builds frama-c = oself.callPackage ./frama-c.nix {}; frama-c-hdrck = oself.callPackage ./frama-c-hdrck.nix {}; + frama-c-lint = oself.callPackage ./frama-c-lint.nix {}; lint = oself.callPackage ./lint.nix {}; # Tests