From 69ae132fc50e70c3e7af01cfd5870d09b3664e9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jun 2023 01:24:53 +0000 Subject: [PATCH 1/4] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'flake-parts': 'github:hercules-ci/flake-parts/dcc36e45d054d7bb554c9cdab69093debd91a0b5' (2023-04-01) → 'github:hercules-ci/flake-parts/71fb97f0d875fd4de4994dfb849f2c75e17eb6c3' (2023-06-01) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/1a9d9175ecc48ecd033062fa09b1834d13ae9c69' (2023-04-13) → 'github:NixOS/nixpkgs/5715d6b452b97d12c6f9077321d202a0cb50b8fc' (2023-06-08) --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 42977f3..f4e0bf9 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1680392223, - "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "lastModified": 1685662779, + "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1681347147, - "narHash": "sha256-B+hTioRc3Jdf4SJyeCiO0fW5ShIznJk2OTiW2vOV+mc=", + "lastModified": 1686186815, + "narHash": "sha256-h6OTafX2eLgFQpu5yJf65JHDKrEVoMLLtTn8ksu1+qE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1a9d9175ecc48ecd033062fa09b1834d13ae9c69", + "rev": "5715d6b452b97d12c6f9077321d202a0cb50b8fc", "type": "github" }, "original": { From 7130e84e9e5c718984114bc086e957bbae1174b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 10 Jun 2023 13:28:57 +0200 Subject: [PATCH 2/4] fix build --- src/nix-eval-jobs.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 62f14fe..0d8c97c 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -140,7 +140,8 @@ static Value *releaseExprTopLevelValue(EvalState &state, Bindings &autoArgs) { Value vTop; if (myArgs.fromArgs) { - Expr *e = state.parseExprFromString(myArgs.releaseExpr, absPath(".")); + Expr *e = state.parseExprFromString( + myArgs.releaseExpr, state.rootPath(CanonPath::fromCwd())); state.eval(e, vTop); } else { state.evalFile(lookupFileArg(state, myArgs.releaseExpr), vTop); @@ -202,7 +203,7 @@ struct Drv { if (myArgs.meta) { nlohmann::json meta_; for (auto &metaName : drvInfo.queryMetaNames()) { - PathSet context; + NixStringContext context; std::stringstream ss; auto metaValue = drvInfo.queryMeta(metaName); From cace652bff0df578119bdd6eee0152c7f284c361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 10 Jun 2023 13:50:23 +0200 Subject: [PATCH 3/4] fix build on darwin --- src/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index ef01a7d..f8fb528 100644 --- a/src/meson.build +++ b/src/meson.build @@ -13,4 +13,4 @@ executable('nix-eval-jobs', src, threads_dep ], install: true, - cpp_args: ['-std=c++17', '-fvisibility=hidden']) + cpp_args: ['-std=c++2a', '-fvisibility=hidden']) From 9e8320dbd64d84ca2f008f7b4f9f2451130734a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 10 Jun 2023 13:51:59 +0200 Subject: [PATCH 4/4] fix c++20 warnings --- src/nix-eval-jobs.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 0d8c97c..2fce82c 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -84,11 +84,11 @@ struct MyArgs : MixEvalArgs, MixCommonArgs { .labels = {"path"}, .handler = {&gcRootsDir}}); - addFlag( - {.longName = "workers", - .description = "number of evaluate workers", - .labels = {"workers"}, - .handler = {[=](std::string s) { nrWorkers = std::stoi(s); }}}); + addFlag({.longName = "workers", + .description = "number of evaluate workers", + .labels = {"workers"}, + .handler = { + [=, this](std::string s) { nrWorkers = std::stoi(s); }}}); addFlag( {.longName = "max-memory-size", @@ -96,7 +96,7 @@ struct MyArgs : MixEvalArgs, MixCommonArgs { "maximum evaluation memory size (4GiB per worker by default)", .labels = {"size"}, .handler = { - [=](std::string s) { maxMemorySize = std::stoi(s); }}}); + [=, this](std::string s) { maxMemorySize = std::stoi(s); }}}); addFlag({.longName = "flake", .description = "build a flake",