diff options
Diffstat (limited to 'modules/lang/.nix')
-rw-r--r-- | modules/lang/.nix/derivation.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/modules/lang/.nix/derivation.nix b/modules/lang/.nix/derivation.nix new file mode 100644 index 0000000..54ebb5e --- /dev/null +++ b/modules/lang/.nix/derivation.nix @@ -0,0 +1,45 @@ +{ lib +, stdenv +, scons +, clang-tools +, version +, build_examples ? false +, forstio +}: + +stdenv.mkDerivation { + pname = "forstio-tools"; + inherit version; + src = ./..; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + scons + clang-tools + ]; + + buildInputs = [ + forstio.core + forstio.async + forstio.io + forstio.codec + forstio.codec-json + ]; + + doCheck = true; + checkPhase = '' + scons test + ./bin/tests + ''; + + buildPhase = '' + scons build_examples=${build_examples} + ''; + + installPhase = '' + scons prefix=$out build_examples=${build_examples} install + ''; + + outputs = ["out" "dev"]; +} |