Skip to content

chore(nix): various dev shell improvements#1306

Open
0xda157 wants to merge 9 commits into
Autodesk:devfrom
0xda157:nix-shell
Open

chore(nix): various dev shell improvements#1306
0xda157 wants to merge 9 commits into
Autodesk:devfrom
0xda157:nix-shell

Conversation

@0xda157
Copy link
Copy Markdown

@0xda157 0xda157 commented Apr 30, 2026

The point of a nix dev shell is to include tools needed to interact with the project, so one doesn't have to install them globally. Therefor we should include any programs required, not just playwright.

I also changed shebangs from /bin/bash to /usr/bin/env bash which allows users of OSs that don't install programs to /bin (such as nixos) to the scripts

Direnv allows for automatically entering and exiting nix shells when cd-ing in/out of the directory in question, which makes thing much more convenient for nix users. It also removes the possibility of using a shell which no longer reflects the code, which can be a common source of issues.

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/fbcf476f790d8a217c3eab4e12033dc4a0f6d23c?narHash=sha256-wNO3%2BKs2jZJ4nTHMuks%2BcxAiVBGNuEBXsT29Bz6HASo%3D' (2025-08-14)
  → 'github:nixos/nixpkgs/1c3fe55ad329cbcb28471bb30f05c9827f724c76?narHash=sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M%2BC8yzzIRYbE%3D' (2026-04-27)
@0xda157 0xda157 changed the title chore(nix): add bun and git-lfs to dev shell chore(nix): add node, bun, and git-lfs to dev shell Apr 30, 2026
@0xda157 0xda157 requested review from a team as code owners April 30, 2026 03:47
@0xda157 0xda157 changed the title chore(nix): add node, bun, and git-lfs to dev shell chore(nix): various dev shell improvements Apr 30, 2026
Comment thread .gitignore
Comment on lines -11 to +12
.idea No newline at end of file
.idea
**/.direnv
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.

@BrandonPacewic What's the stance on newlines at EOF?

Copy link
Copy Markdown
Member

@HunterBarclay HunterBarclay left a comment

Choose a reason for hiding this comment

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

@0xda157 Could you provide a Nix README file and add a section to the main README referring to it? I think this has some really good potential, but as someone who has never really looked into Nix before reading this PR, it took me like an hour to figure out how to even start a shell correctly.

Comment thread flake.nix
Comment thread flake.nix
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?

@HunterBarclay
Copy link
Copy Markdown
Member

@0xda157 I'd also suggest shell hooks for the following

fission

shellHook = "cd ./fission"

exporter

shellHook = "cd ./exporter/SynthesisFusionAddin"

@0xda157
Copy link
Copy Markdown
Author

0xda157 commented May 12, 2026

Could you provide a Nix README file and add a section to the main README referring to it? I think this has some really good potential, but as someone who has never really looked into Nix before reading this PR, it took me like an hour to figure out how to even start a shell correctly.

I added a section to contributing.md about it, but I'm not so sure a guide on how to install/use nix belongs in the synthesis contributing guide.

I'd also suggest shell hooks for the following

shellHook = "cd ./fission"
shellHook = "cd ./exporter/SynthesisFusionAddin"

Shell hooks generally aren't used like this, because shells can be entered from anywhere (e.g. running nix develop inside ./fission). It'd be better to do the reverse using direnv. Once you install direnv and direnv allow the .envrc file direnv will automatically run nix develop for you when you change directories into the relevant directory.

@HunterBarclay HunterBarclay self-requested a review May 13, 2026 14:51
@HunterBarclay HunterBarclay dismissed their stale review May 13, 2026 14:52

Changes to default shell and explanation for why the others shouldn't be made are satisfactory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants