blob: 0ce641b3c5f0f0636ee2a4d41f396c3855c48c0f [file] [log] [blame]
Thomas Heijligend1e04572023-11-27 14:28:55 +00001with import <nixpkgs> { };
2
3stdenv.mkDerivation rec {
4 pname = "spark_fs_drivers";
5 version = "0.0.0";
6
7 src = ./.;
8
9 nativeBuildInputs = [
10 gnat
11 gprbuild
12 spark2014
13 z3
Thomas Heijligen62268ee2023-11-27 15:10:41 +000014 cppcheck
Thomas Heijligend1e04572023-11-27 14:28:55 +000015 ];
16
17 gprFile = "default.gpr";
18
19 dontConfigure = true;
20
21 buildPhase = ''
22 runHook preBuild
23
24 gprbuild -P ${gprFile}
25 gnatprove -P ${gprFile} --prover=z3
26
27 runHook postBuild
28 '';
29
30 installPhase = ''
31 runHook preInstall
32
33 mkdir -p $out/bin
34 gprinstall --prefix=$out ${gprFile} \
35 --no-project \
36 --no-manifest \
37 --mode=usage
38
39 runHook postInstall
40 '';
41}