Gleamish/flake.nix

41 lines
1012 B
Nix
Raw Permalink Normal View History

2024-05-21 16:36:13 +00:00
{
description = "Gleamish";
inputs = {
nixpkgs.follows = "gleam2nix/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
gleam2nix.url = "github:mtoohey31/gleam2nix";
};
outputs = { self, nixpkgs, flake-utils, gleam2nix }: {
overlays = rec {
expects-gleam2nix = final: _: {
Gleamish = final.buildGleamProgram {
src = builtins.path { path = ./.; name = "Gleamish-src"; };
};
};
default = nixpkgs.lib.composeManyExtensions [
gleam2nix.overlays.default
expects-gleam2nix
];
buildInputs = with nixpkgs; [
tree-sitter-grammars.tree-sitter-gleam
];
};
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
overlays = [ self.overlays.default ];
inherit system;
};
inherit (pkgs) Gleamish mkShell;
in
{
packages.default = Gleamish;
devShells.default = mkShell {
inputsFrom = [ Gleamish ];
};
});
}