From 18bf2f08ee86fd1ed0a663d256e1c7d3142827d7 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Thu, 12 Sep 2024 17:30:21 +0200 Subject: lang module separating from tools --- modules/lang/.nix/derivation.nix | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 modules/lang/.nix/derivation.nix (limited to 'modules/lang/.nix/derivation.nix') 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"]; +} -- cgit v1.2.3