-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
57 lines (56 loc) · 1.32 KB
/
flake.nix
File metadata and controls
57 lines (56 loc) · 1.32 KB
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
53
54
55
56
57
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = {
self,
nixpkgs,
...
} @ inputs:
inputs.flake-utils.lib.eachDefaultSystem (system: let
name = "cs4410-flake";
src = ./.;
pkgs = nixpkgs.legacyPackages.${system};
p3pkgs = pkgs.python312Packages;
ocaml-pkgs = with pkgs.ocamlPackages; [
findlib
extlib
ounit2
utop
odoc
ocaml-lsp
ocamlformat
ocamlbuild
];
build-pkgs = with pkgs; [
ocaml
dune_3
nasm
clang
valgrind
gdb
];
grading-pkgs = with pkgs; [
unzip # to unzip student submissions :p
pyright # to develop my grading script
p3pkgs.orgparse # ditto
];
in {
devShells.default = pkgs.mkShell {
buildInputs = build-pkgs ++ ocaml-pkgs;
};
devShells.grading = pkgs.mkShell {
buildInputs = build-pkgs ++ ocaml-pkgs ++ grading-pkgs;
shellHook = ''
export "LDFLAGS=-z noexecstack"
'';
};
packages = {
default =
pkgs.writers.writePython3Bin "grading"
{libraries = [p3pkgs.orgparse];}
(builtins.readFile ./grading.py);
};
});
}