diff --git a/nix/frama-c.nix b/nix/frama-c.nix
index cb25fea5c8e83100d1a2b7523451ea588a81247d..0678053029619d4777379a3970390b64a9424c39 100644
--- a/nix/frama-c.nix
+++ b/nix/frama-c.nix
@@ -124,7 +124,7 @@ stdenvNoCC.mkDerivation rec {
   dune_opt = if release_mode then "--release" else "" ;
 
   buildPhase = (if cover then ''
-      export DUNE_WORKSPACE="dev/dune-workspace.cover"
+      export DUNE_WORKSPACE="$(pwd)/dev/dune-workspace.cover"
     '' else "") +
     ''
       dune build -j2 --display short --error-reporting=twice $dune_opt @install
diff --git a/nix/mk_tests.nix b/nix/mk_tests.nix
index ceab5c12649c87c2822ba1fc6faa433ac6658654..4a54d793df4e03181c10f31f7b7a997a7f56b727 100644
--- a/nix/mk_tests.nix
+++ b/nix/mk_tests.nix
@@ -92,7 +92,7 @@ stdenvNoCC.mkDerivation {
     (if cover
      then ''
          mkdir -p _bisect
-         export DUNE_WORKSPACE="dev/dune-workspace.cover"
+         export DUNE_WORKSPACE="$(pwd)/dev/dune-workspace.cover"
          export BISECT_FILE="$(pwd)/_bisect/bisect-"
      ''
      else "");