all repos — vite @ df47cd5e92f267c720c6b07bad78835d6ecc84a0

a fast (this time, actually) and minimal static site generator

flake.nix (view raw)

 1{
 2  description = "a fast and minimal static site generator";
 3
 4  inputs.nixpkgs.url = "github:nixos/nixpkgs";
 5
 6  outputs =
 7    { self
 8    , nixpkgs
 9    ,
10    }:
11    let
12      supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
13      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
14      nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
15    in
16    {
17      overlay = final: prev: {
18        vite = self.packages.${prev.system}.gostart;
19      };
20      nixosModule = import ./module.nix;
21      packages = forAllSystems (system:
22        let
23          pkgs = nixpkgsFor.${system};
24        in
25        {
26          vite = pkgs.buildGoModule {
27            name = "vite";
28            rev = "master";
29            src = ./.;
30
31            vendorHash = "sha256-aHPT3Vl0is+NYaHqkdDjDjEVjvXnwCqK7Bbgm5FhBT0=";
32          };
33        });
34
35      defaultPackage = forAllSystems (system: self.packages.${system}.vite);
36      devShells = forAllSystems (system:
37        let
38          pkgs = nixpkgsFor.${system};
39        in
40        {
41          default = pkgs.mkShell {
42            nativeBuildInputs = with pkgs; [
43              go
44            ];
45          };
46        });
47    };
48}