Skip to content

Commit fff279c

Browse files
committed
Add Nix package to new Zig compiler
1 parent 954ff25 commit fff279c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/flake.nix

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,27 @@
4848
'';
4949

5050
in {
51+
packages = {
52+
default = self.packages.${system}.roc;
53+
roc = pkgs.stdenv.mkDerivation {
54+
name = "roc";
55+
src = ../.;
56+
nativeBuildInputs = [ pkgs.zig.hook ];
57+
zigBuildFlags = [ ];
58+
};
59+
};
60+
61+
apps = {
62+
default = self.apps.${system}.roc;
63+
roc = {
64+
type = "app";
65+
program = "${self.packages.${system}.roc}/bin/roc";
66+
meta = {
67+
description = "Roc CLI";
68+
mainProgram = "roc";
69+
};
70+
};
71+
};
5172

5273
devShell = pkgs.mkShell {
5374
buildInputs = dependencies;

0 commit comments

Comments
 (0)