diff --git a/nix/default.nix b/nix/default.nix
index 985c13130cb2263a113625feb1286134e033b715..0cdac75225474e2de277e3c1c7b6900747eea42d 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -63,7 +63,8 @@ rec {
   lint = stdenv.mkDerivation {
         name = "frama-c-lint";
         inherit src;
-        buildInputs = (mk_buildInputs {opamPackages = [ "ocp-indent" ];} ) ++ [ pkgs.bc plugins.headache.installed ];
+        buildInputs = (mk_buildInputs { opamPackages = [ { name = "ocp-indent"; constraint = "=1.6.1"; } ];} )
+                      ++ [ pkgs.bc plugins.headache.installed ];
         outputs = [ "out" ];
         postPatch = ''
                patchShebangs .