Add Nix package to new Zig compiler

This commit is contained in:
Hannes 2025-11-05 12:47:28 +08:00 committed by Anton-4
parent 54ffb15918
commit b3739b8a4f

View file

@ -50,6 +50,30 @@
'';
in {
packages = {
default = self.packages.${system}.roc;
roc = pkgs.stdenv.mkDerivation {
name = "roc";
src = ../.;
nativeBuildInputs = [ zig.hook pkgs.pkg-config ];
zigBuildFlags = [ "-Doptimize=ReleaseFast" ];
# NIX_CFLAGS_COMPILE="";
# NIX_LDFLAGS="";
};
};
apps = {
default = self.apps.${system}.roc;
roc = {
type = "app";
program = "${self.packages.${system}.roc}/bin/roc";
meta = {
description = "Roc CLI";
mainProgram = "roc";
};
};
};
devShell = pkgs.mkShell {
buildInputs = dependencies;