Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/NixFlakeCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Nix Flake - Check

on:
workflow_dispatch: {}
push:
branches: [ prod, dev ]
pull_request:
branches: [ prod, dev ]

jobs:
flake-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6

- uses: cachix/install-nix-action@v31

- run: nix flake check

formatting-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6

- uses: cachix/install-nix-action@v31

- run: nix fmt -- --ci
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ renderer/
.DS_Store
*.pkg
*.exe
.idea
.idea
**/.direnv
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ Be sure to fill out the pull request template accordingly to make reviewing your

# How to Contribute

### Development with Nix

It's entirely possible to contribute to Synthesis without using Nix, but some may
prefer to use it. In order to use Nix with synthesis, you must first [install nix](https://nixos.org/download/),
[enable flakes](https://wiki.nixos.org/wiki/Flakes#Setup), then you can enter
one of shells with `nix develop` (e.g. `nix develop .#syntehsis`). You can also
use [direnv](https://direnv.net/) to automatically enter into the relevant dev-shell.

### Found a bug? Have an idea for a feature?

Please [contact us](#Contact-Us) to let us know about the issue or feature!
Expand Down
3 changes: 3 additions & 0 deletions exporter/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if command -v nix &>/dev/null; then
use flake .#exporter
fi
3 changes: 3 additions & 0 deletions fission/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if command -v nix &>/dev/null; then
use flake .#fission
fi
6 changes: 3 additions & 3 deletions fission/flake.lock → flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 18 additions & 3 deletions fission/flake.nix → flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

outputs =
inputs:
{ self, nixpkgs }:
let
supportedSystems = [
"x86_64-linux"
Expand All @@ -13,12 +13,16 @@
"aarch64-darwin"
];
forEachSupportedSystem =
f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f inputs.nixpkgs.legacyPackages.${system});
f: nixpkgs.lib.genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
in
{
devShells = forEachSupportedSystem (pkgs: {
default = pkgs.mkShell {
Comment thread
0xda157 marked this conversation as resolved.
default = self.devShells.${pkgs.stdenv.hostPlatform.system}.fission;
fission = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
nodejs
bun
git-lfs
playwright-driver.browsers
];

Expand All @@ -27,8 +31,19 @@
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true;
};
};
exporter = pkgs.mkShell {
packages = with pkgs; [
python3
black
isort
bun
];
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azaleacolburn Shell for using emscripten to compile Jolt?

});

formatter = forEachSupportedSystem (pkgs: pkgs.nixfmt-tree);

# Build all devShells, instead of just verifying they are deviations
checks = forEachSupportedSystem (pkgs: self.devShells.${pkgs.stdenv.hostPlatform.system});
};
}
2 changes: 1 addition & 1 deletion installer/exporter/OSX/Scripts/preinstall
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

FUSION_ADDIN_LOCATION=~/Library/Application\ Support/Autodesk/ApplicationPlugins/

Expand Down
2 changes: 1 addition & 1 deletion installer/exporter/OSX/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

FUSION_ADDIN_LOCATION=~/Library/Application\ Support/Autodesk/ApplicationPlugins/
EXPORTER_SOURCE_DIR=../../../exporter/SynthesisFusionAddin/
Expand Down
3 changes: 3 additions & 0 deletions multiplayer/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if command -v nix &>/dev/null; then
use flake .#fission
fi
2 changes: 1 addition & 1 deletion protocols/proto_compile.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if ! [ -d ../api/Api/Gen/ ]
then
mkdir ../api/Api/Gen/
Expand Down
Loading