1
1
mirror of https://github.com/nmattia/niv.git synced 2024-09-16 01:47:08 +03:00

Merge pull request #104 from nmattia/nm-update-nixpkgs

nixpkgs: 18.09 -> 19.03
This commit is contained in:
Nicolas Mattia 2019-06-26 11:33:25 +02:00 committed by GitHub
commit 099f9ea921
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -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/<owner>/<repo>/archive/<rev>.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"
}
}
}

View File

@ -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