[Nix-dev] fetchFromGithub
Eric Seidel
eric at seidel.io
Mon Jun 1 04:13:05 CEST 2015
If you're trying to automate things, I bet github provides an API to get
the latest revision or tag. Still an extra network request, but not as
bad as cloning the whole repo.
On Sun, May 31, 2015, at 19:10, Arseniy Seroka wrote:
> I know that. But I have to know revision to use `fetchZip`.
> I can get the latest revision from `nix-prefetch-git` as I mentioned..
> But that way gives me wrong sha for future use in `fetchFromGithub`.
>
> Surely I can do it twice, first use `nix-prefetch-git` to get info,
> and after that use `nix-prefetch-zip`. But that's not good IMO :(
>
> 2015-06-01 5:05 GMT+03:00 Eric Seidel <eric at seidel.io>:
>
> > `fetchFromGithub` is a wrapper around `fetchZip` [1], so I suspect
> > `nix-prefetch-zip` would work.
> >
> > [1]:
> >
> > https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix#L372
> >
> > On Sun, May 31, 2015, at 18:44, Arseniy Seroka wrote:
> > > Hello!
> > > What is a proper way to get pkg's sha if I use `fetchFromGithub`?
> > > I do `nix-prefetch-git https://github/repo/owner` to get latest
> > > revision and hash sum. And use`fetchGit` in derivation.
> > >
> > > But now I want to switch to a right way of fetching from GH. But
> > > how can I do this (get information about latest rev, date, sha256 etc.)
> > > to use `fetchFromGithub`? It's hash sum is different than `fetchGit`.
> > >
> > > --
> > > Sincerely,
> > > Arseniy Seroka
> > > _______________________________________________
> > > nix-dev mailing list
> > > nix-dev at lists.science.uu.nl
> > > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> > _______________________________________________
> > nix-dev mailing list
> > nix-dev at lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> >
>
>
>
> --
> Sincerely,
> Arseniy Seroka
More information about the nix-dev
mailing list