-
- # Executables required for runtime
- # These packages will be added to the PATH
- zigWrapperBins = with env.pkgs; [];
-
- # Libraries required for runtime
- # These packages will be added to the LD_LIBRARY_PATH
- zigWrapperLibs = attrs.buildInputs or [];
- });
-
- # For bundling with nix bundle for running outside of nix
- # example: https://github.com/ralismark/nix-appimage
- apps.bundle = {
- type = "app";
- program = "${packages.foreign}/bin/default";
- };
-
- # nix run .
- apps.default = env.app [] "zig build run -- \"$@\"";
-
- # nix run .#build
- apps.build = env.app [] ''
- mkdir -p ext
- ln -s ${zighttp} ext/zighttp
- ln -s ${ziglmdb} ext/ziglmdb
- zig build "$@"
- '';
-
- # nix run .#test
- apps.test = env.app [] "zig build test -- \"$@\"";
-
- # nix run .#docs
- apps.docs = env.app [] "zig build docs -- \"$@\"";
-
- # nix run .#zig2nix
- apps.zig2nix = env.app [] "zig2nix \"$@\"";
-
- # nix develop
- devShells.default = env.mkShell {
- # Packages required for compiling, linking and running
- # Libraries added here will be automatically added to the LD_LIBRARY_PATH and PKG_CONFIG_PATH
- nativeBuildInputs = []
- ++ packages.default.nativeBuildInputs
- ++ packages.default.buildInputs
- ++ packages.default.zigWrapperBins
- ++ packages.default.zigWrapperLibs;