Created
July 12, 2025 08:21
-
-
Save toyboot4e/354a2b60f8145956ffe808bdc9cedbe0 to your computer and use it in GitHub Desktop.
LunarML setup with flake.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "A basic flake with a shell"; | |
| inputs = { | |
| nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | |
| flake-utils.url = "github:numtide/flake-utils"; | |
| }; | |
| outputs = | |
| { | |
| nixpkgs, | |
| flake-utils, | |
| ... | |
| }: | |
| flake-utils.lib.eachDefaultSystem ( | |
| system: | |
| let | |
| pkgs = import nixpkgs { | |
| inherit system; | |
| }; | |
| lunarmlBin = pkgs.writeShellScriptBin "lunarml" '' | |
| exec "${pkgs.lunarml}/bin/lunarml" -B "${pkgs.lunarml}/lib/lunarml" "$@" | |
| ''; | |
| in | |
| { | |
| devShells.default = | |
| pkgs.mkShell { | |
| packages = [ | |
| lunarmlBin | |
| ]; | |
| env = { | |
| SML_LIB = "${pkgs.lunarml}/lib/lunarml/ml"; | |
| }; | |
| }; | |
| } | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment