SerenityOS / jakt

The Jakt Programming Language
BSD 2-Clause "Simplified" License
2.82k stars 241 forks source link

nix: fix build and add flake #1557

Closed sreehax closed 6 months ago

sreehax commented 7 months ago

This change makes it insanely simple for anyone with nix to download and run jakt. The existing jakt.nix meant for nix-shell was a great starting point, but it only let you get a dev shell with all the dependencies rather than letting you build and install the project too. The new workflow allows commands such as nix build, nix develop, and nix run, which do exactly what they sound like they do. Additionally, this git repo could easily be added as a flake input for home-manager or NixOS to allow system-wide installation with the included nixpkgs overlay. Legacy nix command (nix-shell, nix-build, etc) compatibility is retained for those who wish to keep using nix-shell or nix-build. I have elected to use clang 16, but that can be changed easily if preferred.

BuggieBot commented 7 months ago

Hello!

One or more of the commit messages in this PR do not match the Jakt code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why. Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

RGBCube commented 6 months ago

I created a PR to make this PR much simpler & use better practices here: https://github.com/sreehax/jakt/pull/1

Building locally works & the devshell works.