summaryrefslogtreecommitdiff
path: root/flake.nix
blob: d1d8c3a2f4ad2ceb3242eb03a42e6be1bb4dd9ca (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
{
  inputs = {
    teleia.url = "github:lcolonq/teleia";
    nixpkgs.follows = "teleia/nixpkgs";
    st = {
      url = "github:lcolonq/st";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = inputs@{ self, nixpkgs, ... }:
    let
      system = "x86_64-linux";
      native = {
        renderer = inputs.teleia.native.build ./. "renderer";
      };
      wasm = {
        throwshade = (inputs.teleia.wasm.build ./. "newton_throwshade").overrideAttrs (cur: prev: {
          preBuild = ''
            cd ./crates/throwshade
          '';
          postBuild = ''
            mv ./dist ../..
            cd ../..
          '';
        });
      };
    in {
      packages.${system} = {
        inherit native wasm;
        st = inputs.st.packages.x86_64-linux.st;
      };
      devShells.${system}.default = inputs.teleia.shell;
    };
}