Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manveru/crystal-flake
Flake to build Crystal
https://github.com/manveru/crystal-flake
Last synced: 2 months ago
JSON representation
Flake to build Crystal
- Host: GitHub
- URL: https://github.com/manveru/crystal-flake
- Owner: manveru
- Created: 2021-08-25T15:42:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-16T23:16:23.000Z (about 1 year ago)
- Last Synced: 2024-04-13T15:38:28.488Z (9 months ago)
- Language: Nix
- Size: 50.8 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crystal Nix Flake
An opinionated distribution of Crystal, with following packages:
* [Crystal](https://crystal-lang.org)
* [crystalline](https://github.com/elbywan/crystalline)
* [ameba](https://crystal-ameba.github.io)This is just enough to get my usual development environment going, and
relatively painless to update thanks to the `./update.cr` script.Updates aren't automated yet, but feel free to ping me when I happen to miss a
release.The crystal package comes in two flavours, `crystal` and `crystal-bin`. The
`crystal` package is built from source using the `crystal-bin` one, so if you
want to avoid compilation times, you might want to cache them or use the binary
version.## Nix Shell Usage
nix shell github:manveru/crystal-flake#crystal
nix shell github:manveru/crystal-flake#ameba
nix shell github:manveru/crystal-flake#crystalline## Nix Flake Usage
```nix
{
description = "Usage example";inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
crystal-flake.url = "github:manveru/crystal-flake";
};outputs = {
nixpkgs,
crystal-flake,
...
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
inherit (crystal-flake.legacyPackages.${system}) ameba crystal crystalline;
in {
devShells.${system}.default = pkgs.mkShell {
nativeBuildInputs = [
ameba
crystal
crystalline
];
};
};
}
```## Note
The `darwin` version isn't tested, since I only have an `x86_64-linux` machine,
but in theory the `crystal-bin` packages should work as well as the official
release.