Thomas Heijligen | d1e0457 | 2023-11-27 14:28:55 +0000 | [diff] [blame] | 1 | with import <nixpkgs> { }; |
| 2 | |
| 3 | stdenv.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 Heijligen | 62268ee | 2023-11-27 15:10:41 +0000 | [diff] [blame^] | 14 | cppcheck |
Thomas Heijligen | d1e0457 | 2023-11-27 14:28:55 +0000 | [diff] [blame] | 15 | ]; |
| 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 | } |