-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
53 lines (42 loc) · 1.23 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "Crystal 2 Nix";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, flake-utils }:
(with flake-utils.lib; eachSystem defaultSystems) (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
packages = flake-utils.lib.flattenTree rec {
crystal2nix = pkgs.crystal.buildCrystalPackage {
pname = "crystal2nix";
version = "0.3.0";
src = ./.;
format = "shards";
lockFile = ./shard.lock;
shardsFile = ./shards.nix;
buildInputs = with pkgs; [ openssl ];
nativeBuildInputs = with pkgs; [ pkg-config ];
};
default = crystal2nix;
};
checks = flake-utils.lib.flattenTree {
specs = packages.crystal2nix;
};
devShells = flake-utils.lib.flattenTree {
default = pkgs.mkShell {
buildInputs = with pkgs; [
openssl
];
nativeBuildInputs = with pkgs; [
pkg-config
crystal
shards
];
};
};
});
}