Create a Nix flake and setup Direnv

This commit is contained in:
Nettika 2026-01-28 21:45:39 -08:00
parent 70af2d9ae8
commit 89bd003480
No known key found for this signature in database
7 changed files with 231 additions and 132 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

125
.gitignore vendored
View file

@ -1,124 +1 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) /.direnv/
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
Tests/temp/
Tests/TestData/ExportedGcode/
StaticData/Translations/L10N/
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
node_modules/
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Ignore Android plugin binaries
StaticData/Plugins/
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
MatterControl.userprefs
.vs/
# JetBrains Rider user configuration directory
/.idea/
/MainOutputDirectory.cs

View file

@ -1,7 +0,0 @@
You are developing a web app that is a clone of MatterControl's design tools. MatterControl is a C# 3D modeller and slicer. You are only cloning the 3D design tools, not the slicer/printing capabilities.
Your task list is in @TODO.md.
The source code for the original program, MatterControl, is in the `original` directory. Technical research on the MatterControl codebase can be found in the `research` directory. See @research/index.md for an overview.
Remember to use `nix-shell` to grab temporary tools as needed.

View file

@ -2,12 +2,16 @@
A step-by-step checklist for porting MatterControl's design features to a Vue + TypeScript + three.js web application. A step-by-step checklist for porting MatterControl's design features to a Vue + TypeScript + three.js web application.
If a given step is more complex than anticipated, consider breaking it down into additional steps and adding those checklist items below. If a given step is no longer appropriate or you discern it needs adjusted or re-scoping, raise it in discussion.
When a given step is completed, check it off.
--- ---
## Phase 1: Project Foundation ## Phase 1: Project Foundation
### Development Environment ### Development Environment
- [ ] Create `flake.nix` with Node.js and pnpm - [x] Create `flake.nix` with Node.js and pnpm
- [ ] Add Rust toolchain to `flake.nix` (for later WASM work) - [ ] Add Rust toolchain to `flake.nix` (for later WASM work)
- [ ] Add `flake.lock` and verify `nix develop` works - [ ] Add `flake.lock` and verify `nix develop` works
- [ ] Create `justfile` with `dev`, `build`, `test`, `lint` recipes - [ ] Create `justfile` with `dev`, `build`, `test`, `lint` recipes

61
flake.lock generated Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1769461804,
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

39
flake.nix Normal file
View file

@ -0,0 +1,39 @@
{
description = "MatterControl Web Port - Vue + TypeScript + three.js";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Node.js LTS and pnpm
nodejs_22
pnpm
# Useful development tools
just
];
shellHook = ''
echo "Developer Environment"
echo "Node.js: $(node --version)"
echo "pnpm: $(pnpm --version)"
'';
};
}
);
}

124
original/.gitignore vendored Normal file
View file

@ -0,0 +1,124 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
Tests/temp/
Tests/TestData/ExportedGcode/
StaticData/Translations/L10N/
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
node_modules/
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Ignore Android plugin binaries
StaticData/Plugins/
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
MatterControl.userprefs
.vs/
# JetBrains Rider user configuration directory
/.idea/
/MainOutputDirectory.cs