forked from Kattis/problemtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
40 lines (39 loc) · 1.48 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
{
inputs.nixpkgs.url = "nixpkgs/23.11";
outputs = {self, nixpkgs, ...}@inputs:
let
allSystems = [
"x86_64-linux"
];
forAllSystems = fn: nixpkgs.lib.genAttrs allSystems
(system: fn { inherit system; pkgs = import nixpkgs {inherit system; }; });
in {
packages = forAllSystems ({pkgs, system}:
let
problemtools-unwrapped = self.packages.${system}.problemtools-unwrapped;
verifyproblem-unwrapped = "${problemtools-unwrapped}/bin/verifyproblem";
verifyproblem-env = import ./admin/nix/wrapper.nix { inherit pkgs; };
in {
problemtools-unwrapped = import ./admin/nix/default.nix { inherit pkgs; };
verifyproblem = pkgs.writeShellScriptBin "verifyproblem" ''
${verifyproblem-env} ${verifyproblem-unwrapped} "$@"
'';
nio-task-tools = pkgs.buildEnv {
name = "nio-task-tools";
paths = [
inputs.self.packages.${system}.verifyproblem
pkgs.pandoc
(pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-small lastpage pdfprivacy framed;
})
pkgs.gnumake
(pkgs.python3.withPackages (ps: [
ps.igraph
]))
pkgs.rustc
pkgs.gcc
];
};
});
};
}