diff --git a/arion-compose.cabal b/arion-compose.cabal index 6b0c14b..1385f18 100644 --- a/arion-compose.cabal +++ b/arion-compose.cabal @@ -31,7 +31,7 @@ source-repository head common common build-depends: base >=4.12.0.0 && <4.17 - , aeson + , aeson >=2 , aeson-pretty , async , bytestring diff --git a/flake.lock b/flake.lock index b5bf0a3..e3a9e45 100644 --- a/flake.lock +++ b/flake.lock @@ -38,16 +38,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1669791787, - "narHash": "sha256-KBfoA2fOI5+wCrm7PR+j7jHqXeTkVRPQ0m5fcKchyuU=", + "lastModified": 1669980218, + "narHash": "sha256-HBK1tIqarj7ZsSwQEKGlyvbAIFnglytG7FxuS4K3nY8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e76c78d20685a043d23f5f9e0ccd2203997f1fb1", + "rev": "da7988fe440ef5b8779d4f76340ad7dc79ff3b33", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "haskell-updates", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 3ec601c..826980d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Arion - use Docker Compose via Nix"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/haskell-updates"; haskell-flake.url = "github:srid/haskell-flake"; flake-parts.url = "github:hercules-ci/flake-parts/easyOverlay"; # TODO merge flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; diff --git a/src/haskell/lib/Arion/Services.hs b/src/haskell/lib/Arion/Services.hs index d8ecb30..249ccf7 100644 --- a/src/haskell/lib/Arion/Services.hs +++ b/src/haskell/lib/Arion/Services.hs @@ -9,6 +9,7 @@ import Prelude() import Protolude hiding (to) import qualified Data.Aeson as Aeson +import qualified Data.Aeson.Key as AK import Arion.Aeson (decodeFile) import Control.Lens @@ -20,4 +21,4 @@ getDefaultExec fp service = do v <- decodeFile fp - pure ((v :: Aeson.Value) ^.. key "x-arion" . key "serviceInfo" . key service . key "defaultExec" . _Array . traverse . _String) + pure ((v :: Aeson.Value) ^.. key "x-arion" . key "serviceInfo" . key (AK.fromText service) . key "defaultExec" . _Array . traverse . _String)