]> Git — Sourcephile - julm/rezine-rfcs.git/blob - flake.nix
p1: développe l'analyse du processus de décision
[julm/rezine-rfcs.git] / flake.nix
1 {
2 inputs = {
3 nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
4 pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
5 pre-commit-hooks.inputs.nixpkgs-stable.follows = "nixpkgs";
6 pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
7 };
8
9 outputs = inputs:
10 let
11 inherit (inputs.nixpkgs) lib;
12 forAllSystems = f: lib.genAttrs lib.systems.flakeExposed (system: f rec {
13 inherit system;
14 pkgs = inputs.nixpkgs.legacyPackages.${system};
15 });
16 in
17 {
18 # nix -L build .#hello
19 packages = forAllSystems ({ pkgs, ... }: pkgs);
20
21 # nix -L develop or direnv allow
22 devShell = forAllSystems ({ pkgs, system, ... }:
23 pkgs.mkShell {
24 name = "shell";
25 src = null;
26 buildInputs = [
27 pkgs.fontconfig
28 pkgs.gitFull
29 pkgs.jq
30 pkgs.pandoc
31 pkgs.reuse
32 pkgs.shellcheck
33 (pkgs.texlive.combine {
34 inherit (pkgs.texlive)
35 scheme-basic
36 collection-fontsrecommended
37 collection-langfrench
38 collection-latexrecommended
39 collection-luatex
40 environ
41 tcolorbox
42 titling;
43 }
44 )
45 ];
46 inherit (inputs.self.checks.${system}.pre-commit-check) shellHook;
47 FONTCONFIG_FILE = pkgs.makeFontsConf {
48 fontDirectories = [
49 pkgs.dejavu_fonts
50 pkgs.freefont_ttf
51 pkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts
52 pkgs.hack-font
53 pkgs.liberation_ttf
54 pkgs.lmodern
55 pkgs.noto-fonts-emoji
56 pkgs.unifont
57 ];
58 };
59 });
60
61 # nix flake check
62 checks = forAllSystems (args: with args; {
63 pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
64 src = inputs.self;
65 hooks = {
66 nixpkgs-fmt.enable = true;
67 };
68 };
69 });
70 };
71 }