From 3afc53fd0d3b21a60b3221f43b5cc87e21c4e2d8 Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Wed, 26 Jun 2019 11:27:13 +0200 Subject: [PATCH] nixpkgs: 18.09 -> 19.03 --- nix/sources.json | 11 ++++++----- src/Niv/GitHub.hs | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index b889fcd..5889daa 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,13 +1,14 @@ { "nixpkgs": { - "url": "https://github.com/NixOS/nixpkgs-channels/archive/cb1d0c44e99f174fe415040c4566017f83010546.tar.gz", + "url": "https://github.com/NixOS/nixpkgs-channels/archive/8634c3b619909db7fc747faf8c03592986626e21.tar.gz", "owner": "NixOS", - "branch": "nixos-18.09", + "branch": "nixos-19.03", "url_template": "https://github.com///archive/.tar.gz", "repo": "nixpkgs-channels", - "sha256": "1kb3glpr08bpifpvc1fqqanqm35gwc1maclvpfdd9dywmdgaf9di", + "type": "tarball", + "sha256": "0hcpy4q64vbqmlmnfcavfxilyygyzpwdsss8g3p73ikpic0j6ziq", "description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", - "rev": "cb1d0c44e99f174fe415040c4566017f83010546" + "rev": "8634c3b619909db7fc747faf8c03592986626e21" }, "gitignore": { "url": "https://github.com/hercules-ci/gitignore/archive/4064e436313191f11969986e66b81cb6bb61bae6.tar.gz", @@ -19,4 +20,4 @@ "description": "Nix source function for gitignore that just works", "rev": "4064e436313191f11969986e66b81cb6bb61bae6" } -} +} \ No newline at end of file diff --git a/src/Niv/GitHub.hs b/src/Niv/GitHub.hs index c77fd62..80b75fe 100644 --- a/src/Niv/GitHub.hs +++ b/src/Niv/GitHub.hs @@ -15,6 +15,7 @@ import Data.String.QQ (s) import GHC.Exts (toList) import Niv.Update import Data.Text.Encoding (encodeUtf8) +import qualified Data.Aeson as Aeson import qualified Data.Text as T import qualified GitHub as GH import qualified GitHub.Data.Name as GH @@ -26,7 +27,8 @@ data GithubRepo = GithubRepo , repoDefaultBranch :: Maybe T.Text } -executeRequest :: GH.Request 'GH.RO a -> IO (Either GH.Error a) +executeRequest + :: Aeson.FromJSON a => GH.Request 'GH.RO a -> IO (Either GH.Error a) executeRequest req = do token <- fmap (GH.OAuth . encodeUtf8 . T.pack) <$> lookupEnv "GITHUB_TOKEN" GH.executeRequestMaybe token req