aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/mosdepth-plot.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/mosdepth-plot.nix b/tools/mosdepth-plot.nix
index 464e495..e6d2c7d 100644
--- a/tools/mosdepth-plot.nix
+++ b/tools/mosdepth-plot.nix
@@ -1,15 +1,22 @@
{ stdenv
+, lib
, mosdepth
, python
, flags ? null}:
-input:
+with lib;
+
+{ inputs
+, names ? []}:
stdenv.mkDerivation {
name = "mosdepth-depth";
buildInputs = [ python ];
buildCommand = ''
- python ${mosdepth.src}/scripts/plot-dist.py ${input}/*global.dist.txt
+ python ${mosdepth.src}/scripts/plot-dist.py ${concatMapStringsSep " " (i: "${i}/out.mosdepth.global.dist.txt") inputs}
+ ${concatStringsSep "\n" (zipListsWith (i: n: "substituteInPlace dist.html --replace ${i}/out ${n}") inputs names)}
+ substituteInPlace dist.html --replace "x: 0.1" "x: 0.9"
+ substituteInPlace dist.html --replace "y: 0.1" "y: 0.9"
mv dist.html $out
'';
}