about summary refs log tree commit diff
path: root/flake.nix
blob: c9d589d24b98f4b2821c1a49fdf058e7f81af549 (plain)
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
{
  inputs = {
    flake-utils.url = "github:numtide/flake-utils";
    naersk.url = "github:nix-community/naersk";
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  };

  outputs = { self, flake-utils, naersk, nixpkgs }:
    let
      pkgs = (import nixpkgs) {
        system = "x86_64-linux";
      };

      naersk' = pkgs.callPackage naersk {};
      
    in rec {
      packages."x86_64-linux".vokobe = naersk'.buildPackage {
        src = ./.;

        meta = {
          description = "A minimal static site generator tailored to my needs.";
          homepage    = "https://git.emile.space/hanemile/vokobe";
          license     = nixpkgs.licenses.mit;
          platforms   = nixpkgs.platforms.all;
          maintainers = with nixpkgs.maintainers; [
            hanemile
          ];
        };
      };
    
      # For `nix build` & `nix run`:
      defaultPackage = packages."x86_64-linux".vokobe;

      # For `nix develop` (optional, can be skipped):
      devShell = pkgs.mkShell {
        nativeBuildInputs = with pkgs; [ rustc cargo ];
      };

      # hydraJobs."<attr>"."<system>" = derivation;
      hydraJobs = {
        build."x86_64-linux" = packages."x86_64-linux".vokobe;
      };
    };
}