hercules-ci-cnix-expr 0.3.1.0 → 0.3.1.1
raw patch · 8 files changed
+101/−6 lines, 8 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Hercules.CNix.Expr: hmTraverseWithKey_ :: Applicative f => (k -> a -> f ()) -> HashMap k a -> f ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679089743 :: Ptr EvalState -> CInt -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679089760 :: Ptr Value' -> CInt -> Ptr Value' -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679089864 :: Ptr EvalState -> Ptr CChar -> CLong -> Ptr Value' -> Ptr BindingsBuilder' -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091722 :: Ptr EvalState -> Ptr CChar -> CLong -> Ptr Value' -> Ptr BindingsBuilder' -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091737 :: Ptr CChar -> CLong -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091748 :: CDouble -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091759 :: Int64 -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091770 :: CBool -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091808 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091829 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091850 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091881 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr CChar -> Ptr CChar -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091912 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr CChar -> Ptr CChar -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091938 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr CChar -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091962 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr (Ref NixStore) -> IO (Ptr EvalState)
- Hercules.CNix.Expr: inline_c_ffi_6989586621679091986 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092010 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr (Ref NixStore) -> IO (Ptr EvalState)
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092034 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092064 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr CChar -> CLong -> Ptr EvalState -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092108 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> Ptr CChar -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092114 :: IO (Ptr Strings)
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092129 :: Ptr Strings -> Ptr CChar -> CLong -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092157 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr Strings -> Ptr EvalState -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092187 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> Ptr Value' -> Ptr Value' -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092220 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr Value' -> Ptr EvalState -> Ptr Value' -> Ptr EvalState -> Ptr Value' -> IO CInt
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092249 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr Value' -> Ptr EvalState -> Ptr Value' -> IO CInt
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092276 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr Value' -> Ptr EvalState -> IO CInt
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092307 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr Value' -> Ptr EvalState -> Ptr CChar -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092318 :: Ptr Value' -> IO (Ptr Attr')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092327 :: Ptr Value' -> IO (Ptr Attr')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092341 :: Ptr Attr' -> IO (Ptr CChar)
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092350 :: Ptr Attr' -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092360 :: Ptr Attr' -> IO (Ptr Attr')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092387 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> Ptr Value' -> IO (Ptr NixStorePath)
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092419 :: Ptr Value' -> IO CInt
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092432 :: Ptr Value' -> CInt -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092577 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> Ptr CChar -> CLong -> Ptr CChar -> CLong -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092607 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> Ptr Value' -> Ptr Value' -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092634 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr Value' -> Ptr Value' -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092661 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr CChar -> CLong -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092691 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> Ptr CChar -> CLong -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092722 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr EvalState -> Ptr CChar -> CLong -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092749 :: Ptr BindingsBuilder' -> IO (Ptr Value')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092763 :: Ptr EvalState -> CInt -> IO (Ptr BindingsBuilder')
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092772 :: Ptr BindingsBuilder' -> IO ()
- Hercules.CNix.Expr: inline_c_ffi_6989586621679092778 :: IO (Ptr Value')
- Hercules.CNix.Expr: mkNull :: IO RawValue
- Hercules.CNix.Expr: traverseWithKey_ :: Applicative f => (k -> a -> f ()) -> Map k a -> f ()
- Hercules.CNix.Expr: withBindingsBuilder :: Integral n => Ptr EvalState -> n -> (Ptr BindingsBuilder' -> IO ()) -> IO (Value NixAttrs)
- Hercules.CNix.Expr: withBindingsBuilder' :: Integral n => Ptr EvalState -> n -> (Ptr BindingsBuilder' -> IO a) -> IO a
- Hercules.CNix.Expr.Raw: inline_c_ffi_6989586621679050577 :: Ptr Value' -> IO CInt
- Hercules.CNix.Expr.Raw: inline_c_ffi_6989586621679050750 :: Ptr CInt -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr (Ptr ()) -> Ptr (Ptr AbstractCppExceptionPtr) -> Ptr Value' -> Ptr EvalState -> IO ()
- Hercules.CNix.Expr.Typed: inline_c_ffi_6989586621679069210 :: Ptr Value' -> IO CInt
- Hercules.CNix.Expr.Typed: inline_c_ffi_6989586621679069219 :: Ptr Value' -> IO (Ptr CChar)
- Hercules.CNix.Expr.Typed: inline_c_ffi_6989586621679069228 :: Ptr Value' -> IO CInt
Files
- CHANGELOG.md +10/−0
- hercules-ci-cnix-expr.cabal +3/−1
- src/Hercules/CNix/Expr.hs +39/−1
- src/Hercules/CNix/Expr/Context.hs +8/−2
- src/Hercules/CNix/Expr/Raw.hs +9/−1
- src/Hercules/CNix/Expr/Typed.hs +24/−1
- test/data/sample.json +1/−0
- test/data/simple-flake/flake.nix +7/−0
CHANGELOG.md view
@@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.3.1.1 - 2022-03-21++### Fixed++ - Add test data that was missing from the sdist tarball++### Removed++ - Clean up inline-c generated exports+ ## 0.3.1.0 - 2022-03-18 ### Added
hercules-ci-cnix-expr.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: hercules-ci-cnix-expr-version: 0.3.1.0+version: 0.3.1.1 synopsis: Bindings for the Nix evaluator category: Nix, CI, Testing, DevOps homepage: https://docs.hercules-ci.com@@ -13,6 +13,8 @@ build-type: Custom extra-source-files: CHANGELOG.md+ test/data/sample.json+ test/data/simple-flake/flake.nix data-dir: data data-files:
src/Hercules/CNix/Expr.hs view
@@ -10,7 +10,45 @@ {-# LANGUAGE TypeFamilies #-} module Hercules.CNix.Expr- ( module Hercules.CNix.Expr,+ ( init,+ setTalkative,+ setDebug,+ setGlobalOption,+ setOption,+ logInfo,+ withEvalState,+ withEvalStateConduit,+ addAllowedPath,+ addInternalAllowedPaths,+ evalFile,+ newStrings,+ appendString,+ evalArgs,+ autoCallFunction,+ isDerivation,+ isFunctor,+ getRecurseForDerivations,+ getAttr,+ mkNullableRawValue,+ getAttrs,+ getDrvFile,+ getAttrBool,+ getList,+ getAttrList,+ valueFromExpressionString,+ callFunction,+ apply,+ mkPath,+ getFlakeFromFlakeRef,+ getLocalFlake,+ getFlakeFromGit,+ getFlakeFromArchiveUrl,+ ToRawValue(..),+ ToValue(..),+ FromValue(..),+ ViaJSON(..),++ -- * Re-exports RawValue, rawValueType, module Hercules.CNix.Store,
src/Hercules/CNix/Expr/Context.hs view
@@ -1,10 +1,16 @@ {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE QuasiQuotes #-}-{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TemplateHaskellQuotes #-} module Hercules.CNix.Expr.Context- ( module Hercules.CNix.Expr.Context,+ ( context,+ evalContext,+ EvalState,+ Value',+ Attr',+ BindingsBuilder', module Hercules.CNix.Store.Context,+ (=:), ) where
src/Hercules/CNix/Expr/Raw.hs view
@@ -1,7 +1,15 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} -module Hercules.CNix.Expr.Raw where+module Hercules.CNix.Expr.Raw+ ( RawValue (..),+ mkRawValue,+ RawValueType (..),+ rawValueType,+ forceValue,+ canonicalRawType,+ )+where import Hercules.CNix.Expr.Context import qualified Language.C.Inline.Cpp as C
src/Hercules/CNix/Expr/Typed.hs view
@@ -2,7 +2,30 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} -module Hercules.CNix.Expr.Typed where+module Hercules.CNix.Expr.Typed+ ( Value (..),+ NixInt,+ NixFloat,+ NixString,+ NixPath,+ NixAttrs,+ NixList,+ NixFunction,+ NixPrimOp,+ NixPrimOpApp,+ NixExternal,+ unsafeAssertType,+ Match (..),+ match,+ match',+ getBool,+ getStringIgnoreContext,+ hasContext,+ CheckType (..),+ assertType,+ HasRawValueType (..),+ )+where import Control.Exception (throwIO) import Hercules.CNix.Expr.Context
+ test/data/sample.json view
@@ -0,0 +1,1 @@+{"evaluationDependencies":[{"outputName":"out","index":0,"derivation":{"status":"BuildSuccess","derivationPath":"/nix/store/n35qnfkwxjhfymb50l3q5sdzkab7hnbh-cabal2nix-hercules-ci-cli.drv"}},{"outputName":"out","index":1,"derivation":{"status":"BuildSuccess","derivationPath":"/nix/store/68gb4lfd5fbfx4b4yw4gqdnp516blq8m-cabal2nix-hercules-ci-agent.drv"}},{"outputName":"out","index":2,"derivation":{"status":"BuildSuccess","derivationPath":"/nix/store/bkr8lyjjgbrp0l8jq2aq38xi1jna60by-cabal2nix-hercules-ci-api-agent.drv"}},{"outputName":"out","index":3,"derivation":{"status":"BuildSuccess","derivationPath":"/nix/store/gykwqfjbn4kqz7fxcxympmvaxnvhb03n-cabal2nix-hercules-ci-api-core.drv"}},{"outputName":"out","index":4,"derivation":{"status":"BuildSuccess","derivationPath":"/nix/store/skli1vr8yinzi4i7d7jla67ymjxym5s7-cabal2nix-hercules-ci-cnix-store.drv"}},{"outputName":"out","index":5,"derivation":{"status":"BuildSuccess","derivationPath":"/nix/store/x54psjsdr53aqiqcxm9c4syypm697vy3-cabal2nix-hercules-ci-cnix-expr.drv"}},{"outputName":"out","index":6,"derivation":{"status":"BuildSuccess","derivationPath":"/nix/store/rz13gdd7waarqr6b0s1pzvhy6pb4vllr-cabal2nix-hercules-ci-api.drv"}}],"derivationsBuildingCount":0,"unmetAgentRequirements":[],"evaluationLog":"05707361-542f-4e26-89df-a00b85b3855c","agentVersion":"0.8.2","derivationsDependencyFailureCount":0,"derivationsBuildSuccessCount":2221,"derivationsBuildFailureCount":0,"attributes":[{"path":["count"],"value":{"Ok":{"status":"BuildFailure","derivationPath":"/nix/store/bnzi2abvrj8w5pdmcqhnch1qx2nxaqfh-effect-secrets-test.drv"}},"typ":"Effect"},{"path":["hello"],"value":{"Ok":{"status":"BuildSuccess","derivationPath":"/nix/store/90jjw94xiyg5drj70whm9yll6xjj0ca9-hello-2.10.drv"}},"typ":"Regular"}],"derivationsWaitingCount":0,"derivationsCancelledCount":0,"derivations":{},"id":"05707361-542f-4e26-89df-a00b85b3855c","messages":[],"agentHostname":"agent-2"}
+ test/data/simple-flake/flake.nix view
@@ -0,0 +1,7 @@+{+ description = "A very simple flake";+ inputs = { };+ outputs = { ... }: {+ lib.greeting = "hello flake";+ };+}