hercules-ci-cnix-expr 0.2.0.1 → 0.2.0.2
raw patch · 4 files changed
+13/−4 lines, 4 files
Files
- CHANGELOG.md +5/−0
- hercules-ci-cnix-expr.cabal +1/−1
- src/Hercules/CNix/Expr.hs +6/−2
- src/Hercules/CNix/Expr/Raw.hs +1/−1
CHANGELOG.md view
@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.2.0.2 - 2022-03-09++### Added++ - Nix 2.7 support ## 0.2.0.1 - 2022-03-07
hercules-ci-cnix-expr.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: hercules-ci-cnix-expr-version: 0.2.0.1+version: 0.2.0.2 synopsis: Bindings for the Nix evaluator category: Nix, CI, Testing, DevOps homepage: https://docs.hercules-ci.com
src/Hercules/CNix/Expr.hs view
@@ -206,7 +206,7 @@ (0 /=) <$> [C.throwBlock| int { if ($(Value *v) == NULL) { throw std::invalid_argument("forceValue value must be non-null"); }- $(EvalState *evalState)->forceValue(*$(Value *v));+ $(EvalState *evalState)->forceValue(*$(Value *v), nix::noPos); return $(EvalState *evalState)->isDerivation(*$(Value *v)); }|] @@ -241,7 +241,7 @@ if (iter == v->attrs->end()) { return 0; } else {- evalState.forceValue(*iter->value);+ evalState.forceValue(*iter->value, nix::noPos); if (iter->value->type == ValueType::tBool) { return iter->value->boolean ? 1 : 0; } else {@@ -296,8 +296,12 @@ if (!drvInfo) throw EvalError("Not a valid derivation"); +#if NIX_IS_AT_LEAST(2,7,0)+ StorePath storePath = drvInfo->requireDrvPath();+#else std::string drvPath = drvInfo->queryDrvPath(); StorePath storePath = parseStorePath(*state.store, drvPath);+#endif // write it (?) auto drv = state.store->derivationFromPath(printPath23(*state.store, storePath));
src/Hercules/CNix/Expr/Raw.hs view
@@ -140,5 +140,5 @@ [C.catchBlock| { Value *v = $(Value *v); if (v == NULL) throw std::invalid_argument("forceValue value must be non-null");- $(EvalState *evalState)->forceValue(*v);+ $(EvalState *evalState)->forceValue(*v, nix::noPos); }|]