all repos — vite @ 81b8a3faf63f5b53e9d6e95aa09149941c4a2f11

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}.vite;
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}