summaryrefslogtreecommitdiff
path: root/modules/remote-sycl/.nix/derivation.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/remote-sycl/.nix/derivation.nix')
-rw-r--r--modules/remote-sycl/.nix/derivation.nix22
1 files changed, 20 insertions, 2 deletions
diff --git a/modules/remote-sycl/.nix/derivation.nix b/modules/remote-sycl/.nix/derivation.nix
index 4c994a9..440bd86 100644
--- a/modules/remote-sycl/.nix/derivation.nix
+++ b/modules/remote-sycl/.nix/derivation.nix
@@ -4,13 +4,16 @@
, clang-tools
, version
, forstio
+, openmp
, opensycl
+
+, build_examples ? "false"
}:
let
in stdenv.mkDerivation {
- pname = "forstio-device-opencl";
+ pname = "forstio-remote-sycl";
inherit version;
src = ./..;
@@ -26,9 +29,24 @@ in stdenv.mkDerivation {
forstio.codec
forstio.async
forstio.io
- forstio.io_codec
+ forstio.io_codec
+ openmp
opensycl
];
+
+ buildPhase = ''
+ scons build_examples=${build_examples}
+ '';
+
+ installPhase = ''
+ scons prefix=$out build_examples=${build_examples} install
+ '';
+
+ doCheck = true;
+ checkPhase = ''
+ scons test
+ ./bin/tests
+ '';
outputs = ["out" "dev"];
}