mirror of
https://github.com/nmattia/niv.git
synced 2024-09-20 20:07:38 +03:00
Merge pull request #104 from nmattia/nm-update-nixpkgs
nixpkgs: 18.09 -> 19.03
This commit is contained in:
commit
099f9ea921
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user