-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
50 lines (49 loc) · 1.64 KB
/
flake.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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/23.05";
typst-flake.url = "github:typst/typst";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, typst-flake }:
flake-utils.lib.eachDefaultSystem (system:
let
overlayTypst = final: prev: { typst =
typst-flake.packages.${system}.default;
};
pkgs = import nixpkgs { inherit system; overlays = [ overlayTypst ]; };
in {
packages = rec {
default = ecg;
notes = pkgs.writeShellApplication {
name = "notes";
runtimeInputs = [ pkgs.emacs ];
text = ''
emacs -q -l ${./.init.el} notes.org &
'';
};
forms = pkgs.writeShellApplication {
name = "forms";
runtimeInputs = [ (pkgs.python3.withPackages (ps: [ ps.pyyaml ])) ];
text = ''
python3 ${./forms/eval_forms.py} "$@"
'';
};
ecg = pkgs.python3Packages.buildPythonPackage {
name = "ecg";
version = "0.0.1";
src = ./ecg;
propagatedBuildInputs = with (pkgs.python3Packages); [
pyyaml
requests
];
doCheck = false;
};
};
devShells = {
default = import workflow/envs/snakemake_shell.nix { inherit pkgs; };
rshell = import workflow/envs/r_shell.nix { inherit pkgs; };
pdf = import workflow/envs/pdf_shell.nix { inherit pkgs; };
slides = import workflow/envs/slides_shell.nix { inherit pkgs; };
};
});
}