DEVELOPMENT ENVIRONMENT

~liljamo/anemos-test

ref: 2f981427284ee5fe9a55503f7da260009a379659 anemos-test/flake.nix -rw-r--r-- 912 bytes
2f981427Jonni Liljamo feat: init with makeimg packaged 15 days ago
                                                                                
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
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    flake-parts.url = "github:hercules-ci/flake-parts";
    pre-commit-hooks.url = "github:cachix/git-hooks.nix";
  };

  outputs = inputs @ {self, ...}:
    inputs.flake-parts.lib.mkFlake {inherit inputs;} {
      systems = ["x86_64-linux"];
      perSystem = {
        pkgs,
        system,
        ...
      }: {
        packages.makeimg = pkgs.callPackage ./makeimg.nix {};

        checks.pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
          src = ./.;
          hooks.alejandra.enable = true;
        };

        devShells.default = pkgs.mkShell {
          buildInputs = with pkgs; [
            self.packages.${system}.makeimg

            # tools
            just
          ];
          shellHook = ''
            ${self.checks.${system}.pre-commit-check.shellHook}
          '';
        };
      };
    };
}