-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathshell.nix
executable file
·52 lines (45 loc) · 1.36 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
let
name = "Deterload";
pkgs = import <nixpkgs> {};
my-python3 = pkgs.python3.withPackages (python-pkgs: [
# for docs
python-pkgs.pydot
]);
h_content = builtins.toFile "h_content" ''
# ${pkgs.lib.toUpper "${name} usage tips"}
## Configuration
From higher priority to lower priority:
* Configure by CLI:
* `nom-build ... --arg <key> <value> ...`
* `nom-build ... --argstr <key> <strvalue> ...`
* E.g: Generate spec2006 simpoint-guided checkpoints using given source code:
* `nom-build examples/spec2006/ --arg src <PATH_TO_SPEC2006> -A cpts-simpoint`
* Configure by a file: see `examples/*/config.nix`
## Generation
* Generate the simpoint-guided checkpoints for a given <benchmark> into `result/`:
* `nom-build examples/<benchmark> -A cpts-simpoint`
* E.g: Generate simpoint-guided checkpoints for openblas:
* `nom-build examples/openblas -A cpts-simpoint`
## Documentation
* Generate html doc into `book/`
* `make doc`
'';
_h_ = pkgs.writeShellScriptBin "h" ''
${pkgs.glow}/bin/glow ${h_content}
'';
in
pkgs.mkShell {
inherit name;
packages = [
_h_
pkgs.nix-output-monitor
pkgs.mdbook
pkgs.graphviz
pkgs.glibcLocales
my-python3
];
shellHook = ''
export LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive
h
'';
}