nixpkgs/doc/hooks/julec.section.md
adam 155bcc6866
julec.hook: init
Co-authored-by: philiptaron <philip.taron@gmail.com>
2025-10-22 17:02:54 +02:00

2.1 KiB

julec.hook

Jule is an effective programming language designed to build efficient, fast, reliable and safe software while maintaining simplicity.

In Nixpkgs, jule.hook overrides the default build, check and install phases.

Example code snippet

{
  julec,
  clangStdenv,
}:

clangStdenv.mkDerivation (finalAttrs: {
  # ...

  nativeBuildInputs = [ julec.hook ];

  # Customize filenames if needed
  JULE_SRC_DIR = "./src";
  JULE_OUT_DIR = "./bin";
  JULE_OUT_NAME = "hello-jule";
  JULE_TEST_DIR = "./tests";
  JULE_TEST_OUT_DIR = "./test-bin";
  JULE_TEST_OUT_NAME = "hello-jule-test";

  # ...
})

Variables controlling julec.hook

JULE_SRC_DIR

Specifies the source directory containing main.jule. Default is ./src.

JULE_OUT_DIR

Specifies the output directory for the compiled binary. Default is ./bin.

JULE_OUT_NAME

Specifies the name of the compiled binary. Default is output.

JULE_TEST_DIR

Specifies the directory containing test files. Default is the value of JULE_SRC_DIR.

JULE_TEST_OUT_DIR

Specifies the output directory for compiled test binaries. Default is the value of JULE_OUT_DIR.

JULE_TEST_OUT_NAME

Specifies the name of the compiled test binary. Default is the value of JULE_OUT_NAME with -test suffix.

dontUseJulecBuild

When set to true, doesn't use the predefined julecBuildHook. Default is false.

dontUseJulecCheck

When set to true, doesn't use the predefined julecCheckHook. Default is false.

dontUseJulecInstall

When set to true, doesn't use the predefined julecInstallHook. Default is false.