File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change 3434 testcmd() {
3535 zig build snapshot && zig build test
3636 }
37- export -f testscmd
37+ export -f testcmd
3838
3939 fmtcmd() {
4040 zig build fmt
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 pkgs . pkg-config ] ;
57+ zigBuildFlags = [ "-Doptimize=ReleaseFast" ] ;
58+
59+ NIX_CFLAGS_COMPILE = "" ;
60+ NIX_LDFLAGS = "" ;
61+ } ;
62+ } ;
63+
64+ apps = {
65+ default = self . apps . ${ system } . roc ;
66+ roc = {
67+ type = "app" ;
68+ program = "${ self . packages . ${ system } . roc } /bin/roc" ;
69+ meta = {
70+ description = "Roc CLI" ;
71+ mainProgram = "roc" ;
72+ } ;
73+ } ;
74+ } ;
5175
5276 devShell = pkgs . mkShell {
5377 buildInputs = dependencies ;
5478
5579 shellHook = ''
5680 ${ shellFunctions }
57-
81+
5882 echo "Some convenient commands:"
5983 echo "${ shellFunctions } " | grep -E '^\s*[a-zA-Z_][a-zA-Z0-9_]*\(\)' | sed 's/().*//' | sed 's/^[[:space:]]*/ /' | while read func; do
6084 body=$(echo "${ shellFunctions } " | sed -n "/'' ${func}()/,/^[[:space:]]*}/p" | sed '1d;$d' | tr '\n' ';' | sed 's/;$//' | sed 's/[[:space:]]*$//')
You can’t perform that action at this time.
0 commit comments