haskell-te: 2178a246a8bf163af4d67c4f9acd7239053a4f3a
1: with import ./. {};
2: stdenv.mkDerivation {
3: name = "haskell-te-benchmark-env";
4: src = ./benchmarkEnv.nix;
5: unpackPhase = "true";
6: buildInputs = [
7: asv-nix
8: (mkBin {
9: name = "unzipBenchmarks";
10: paths = [ fail nixpkgs.lzip ];
11: script = ''
12: #!${bash}/bin/bash
13: set -e
14: shopt -s nullglob
15:
16: echo "Looking for data" 1>&2
17: [[ -d benchmarks/results ]] || fail "Couldn't find benchmarks/results"
18: [[ -d .asv/results ]] || fail "Couldn't find .asv/results"
19: for D in benchmarks/results/*
20: do
21: [[ -d "$D" ]] || continue
22: DIR=$(basename "$D")
23: [[ -d .asv/results/"$DIR" ]] || fail "Couldn't find .asv/results/$DIR"
24: for F in "$D"/*.json.lz
25: do
26: NAME=$(basename "$F" .lz)
27: echo "Extracting $F to .asv/results/$DIR/$NAME" 1>&2
28: lzip -d < "$F" > .asv/results/"$DIR"/"$NAME"
29: done
30: done
31: '';
32: })
33: ];
34: installPhase = ''
35: set -e
36: echo 'WARNING: Building the "benchmarkEnv" derivation. This is not meant
37: to be a "real" package: it only provides a build environment, for use with
38: nix-shell (e.g. "nix-shell benchmarkEnv.nix")'
39: echo "This is not a 'package', it's meant to be used via nix-shell" > "$out"
40: '';
41: shellHook = ''
42: echo "Entered benchmarking shell: use 'asv' command to run benchmarks." 1>&2
43: echo "Use 'unzipBenchmarks' to extract previous results into place." 1>&2
44: '';
45: }
Generated by git2html.