From e12b29949a7ba3b5fd61693d2eff6c7f58798965 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 27 Jun 2024 14:21:30 +0200 Subject: Adding thread module base --- modules/thread/.nix/derivation.nix | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 modules/thread/.nix/derivation.nix (limited to 'modules/thread/.nix') diff --git a/modules/thread/.nix/derivation.nix b/modules/thread/.nix/derivation.nix new file mode 100644 index 0000000..9175d6a --- /dev/null +++ b/modules/thread/.nix/derivation.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, scons +, clang-tools +, version +, forstio +, build_examples ? "false" +}: + +stdenv.mkDerivation { + pname = "forstio-thread"; + inherit version; + src = ./..; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + scons + clang-tools + ]; + + buildInputs = [ + forstio.core + forstio.async + forstio.io + forstio.codec + forstio.io_codec + ]; + + outputs = [ + "out" + "dev" + ]; + + buildPhase = '' + scons build_examples=${build_examples} + ''; + + installPhase = '' + scons prefix=$out build_examples=${build_examples} install + ''; +} -- cgit v1.2.3