Skip to content

Commit

Permalink
Support hnix-0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
bacchanalia committed Aug 27, 2024
1 parent f0b2235 commit 1ec1f5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Data/Docker/Nix/FetchDocker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ inheritAdapter sourceName sourceLine sourceColumn ks = Nix.Expr.inherit
#endif

-- | @hnix-0.5.0@ omits mkApp.
#if MIN_VERSION_hnix(0,5,0)
#if MIN_VERSION_hnix(0,5,0) && !MIN_VERSION_hnix(0,17,0)
mkApp :: NExpr -> NExpr -> NExpr
mkApp e = Fix . NBinary NApp e
#elif MIN_VERSION_hnix(0,17,0)
-- see: https://github.com/haskell-nix/hnix/pull/1042
mkApp :: NExpr -> NExpr -> NExpr
mkApp e = Fix . NApp e
#endif

{- Example output of the pretty-printed, generated Nix expression AST.
Expand Down

0 comments on commit 1ec1f5a

Please sign in to comment.