diff options
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | flake.lock | 59 | ||||
-rw-r--r-- | flake.nix | 32 |
3 files changed, 99 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..368c110 --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1,8 @@ | |||
1 | # Nix | ||
2 | result/ | ||
3 | result-*/ | ||
4 | |||
5 | # Quarto compiled output. | ||
6 | # Rebuilding from scratch is cheap enough, so no need to track this in git. | ||
7 | /.quarto/ | ||
8 | /_book/ | ||
diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..aecdadf --- /dev/null +++ b/flake.lock | |||
@@ -0,0 +1,59 @@ | |||
1 | { | ||
2 | "nodes": { | ||
3 | "flake-utils": { | ||
4 | "locked": { | ||
5 | "lastModified": 1667395993, | ||
6 | "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", | ||
7 | "owner": "numtide", | ||
8 | "repo": "flake-utils", | ||
9 | "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", | ||
10 | "type": "github" | ||
11 | }, | ||
12 | "original": { | ||
13 | "owner": "numtide", | ||
14 | "repo": "flake-utils", | ||
15 | "type": "github" | ||
16 | } | ||
17 | }, | ||
18 | "flaky-utils": { | ||
19 | "locked": { | ||
20 | "lastModified": 1668472805, | ||
21 | "narHash": "sha256-hjRe8QFh2JMo9u6AaxQNGWfDWZxk3psULmPglqsjsLk=", | ||
22 | "ref": "master", | ||
23 | "rev": "c3f9daf4ec56276e040bc33e29c7eeaf1b99d91c", | ||
24 | "revCount": 33, | ||
25 | "type": "git", | ||
26 | "url": "https://cgit.pacien.net/libs/flaky-utils" | ||
27 | }, | ||
28 | "original": { | ||
29 | "type": "git", | ||
30 | "url": "https://cgit.pacien.net/libs/flaky-utils" | ||
31 | } | ||
32 | }, | ||
33 | "nixpkgs": { | ||
34 | "locked": { | ||
35 | "lastModified": 1668632372, | ||
36 | "narHash": "sha256-Bg0S/+hGLHY7n19+pc0UuxTfkhKwdIAQkt/hpkXnXJ4=", | ||
37 | "owner": "NixOS", | ||
38 | "repo": "nixpkgs", | ||
39 | "rev": "a0297ff0e78388da3785df96b9c4a43e72cc071f", | ||
40 | "type": "github" | ||
41 | }, | ||
42 | "original": { | ||
43 | "owner": "NixOS", | ||
44 | "ref": "a0297ff", | ||
45 | "repo": "nixpkgs", | ||
46 | "type": "github" | ||
47 | } | ||
48 | }, | ||
49 | "root": { | ||
50 | "inputs": { | ||
51 | "flake-utils": "flake-utils", | ||
52 | "flaky-utils": "flaky-utils", | ||
53 | "nixpkgs": "nixpkgs" | ||
54 | } | ||
55 | } | ||
56 | }, | ||
57 | "root": "root", | ||
58 | "version": 7 | ||
59 | } | ||
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e465964 --- /dev/null +++ b/flake.nix | |||
@@ -0,0 +1,32 @@ | |||
1 | # Author: Pacien TRAN-GIRARD | ||
2 | # Licence: EUPL-1.2 | ||
3 | |||
4 | { | ||
5 | inputs = { | ||
6 | # Not yet merged. | ||
7 | # quarto: 1.1.251 -> 1.2.269: https://github.com/NixOS/nixpkgs/pull/201551 | ||
8 | nixpkgs.url = "github:NixOS/nixpkgs/a0297ff"; | ||
9 | flake-utils.url = "github:numtide/flake-utils"; | ||
10 | flaky-utils.url = "git+https://cgit.pacien.net/libs/flaky-utils"; | ||
11 | }; | ||
12 | |||
13 | outputs = { self, nixpkgs, flake-utils, flaky-utils }: | ||
14 | flake-utils.lib.eachDefaultSystem (system: | ||
15 | with nixpkgs.legacyPackages.${system}; | ||
16 | let | ||
17 | |||
18 | tools = [ | ||
19 | pandoc | ||
20 | quarto | ||
21 | ]; | ||
22 | |||
23 | in lib.fold lib.recursiveUpdate { } [ | ||
24 | |||
25 | { | ||
26 | devShell = flaky-utils.lib.mkDevShell { | ||
27 | inherit pkgs tools; | ||
28 | }; | ||
29 | } | ||
30 | |||
31 | ]); | ||
32 | } | ||