make sure we have the right json version in the flake

This commit is contained in:
Green Sky 2024-04-14 12:03:58 +02:00
parent a6614e76ce
commit da83065024
No known key found for this signature in database
2 changed files with 26 additions and 5 deletions

View File

@ -34,10 +34,28 @@
"type": "github"
}
},
"nlohmann-json": {
"flake": false,
"locked": {
"lastModified": 1701207391,
"narHash": "sha256-7F0Jon+1oWL7uqet5i1IgHX0fUw/+z0QwEcA3zs5xHg=",
"owner": "nlohmann",
"repo": "json",
"rev": "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03",
"type": "github"
},
"original": {
"owner": "nlohmann",
"ref": "v3.11.3",
"repo": "json",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nlohmann-json": "nlohmann-json"
}
},
"systems": {

View File

@ -6,9 +6,13 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
flake-utils.url = "github:numtide/flake-utils";
nlohmann-json = {
url = "github:nlohmann/json/v3.11.3"; # TODO: read version from file
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, flake-utils, nlohmann-json }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
@ -61,9 +65,8 @@
"-DTOMATO_ASAN=OFF"
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
"-DFETCHCONTENT_SOURCE_DIR_JSON=${pkgs.nlohmann_json.src}" # we care less about version here
# do we really care less about the version? do we need a stable abi?
"-DFETCHCONTENT_SOURCE_DIR_ZSTD=${pkgs.zstd.src}"
"-DFETCHCONTENT_SOURCE_DIR_JSON=${nlohmann-json}" # we care about the version
"-DFETCHCONTENT_SOURCE_DIR_ZSTD=${pkgs.zstd.src}" # we dont care about the version (we use 1.4.x features)
];
# TODO: replace with install command