File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 33 stdenv ,
44 fetchFromGitHub ,
55 cmake ,
6+ doctest ,
67 fetchpatch ,
8+ nlohmann_json ,
79} :
810
911stdenv . mkDerivation ( finalAttrs : {
@@ -14,8 +16,7 @@ stdenv.mkDerivation (finalAttrs: {
1416 owner = "ToruNiina" ;
1517 repo = "toml11" ;
1618 tag = "v${ finalAttrs . version } " ;
17- hash = "sha256-NnM+I43UVcd72Y9h+ysAAc7s5gZ78mjVwIMReTJ7G5M=" ;
18- fetchSubmodules = true ;
19+ hash = "sha256-sgWKYxNT22nw376ttGsTdg0AMzOwp8QH3E8mx0BZJTQ=" ;
1920 } ;
2021
2122 patches = [
@@ -26,11 +27,21 @@ stdenv.mkDerivation (finalAttrs: {
2627 } )
2728 ] ;
2829
30+ # Required to use the system `doctest` over upstream's submodule
31+ postPatch = lib . optionalString finalAttrs . finalPackage . doCheck ''
32+ substituteInPlace tests/*.{c,h}pp \
33+ --replace-warn '"doctest.h"' '"doctest/doctest.h"'
34+ '' ;
35+
2936 nativeBuildInputs = [
3037 cmake
3138 ] ;
3239 cmakeFlags = [
33- ( lib . cmakeBool "TOML11_BUILD_TOML_TESTS" true )
40+ ( lib . cmakeBool "TOML11_BUILD_TOML_TESTS" finalAttrs . finalPackage . doCheck )
41+ ] ;
42+ checkInputs = [
43+ doctest
44+ nlohmann_json
3445 ] ;
3546 doCheck = true ;
3647
You can’t perform that action at this time.
0 commit comments