Re: [Nix-dev] fetchFromGithub

2015-06-01 Thread Vladimír Čunát
On 06/01/2015 04:13 AM, Eric Seidel wrote: 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. There's no real need for a separate api call. Just provide a tag/branch

Re: [Nix-dev] fetchFromGithub

2015-06-01 Thread Vladimír Čunát
On 06/01/2015 08:42 AM, Arseniy Seroka wrote: But how to get revision number from this for future use? Ah, I'm sorry, I didn't read all properly. I see now what you meant, and I've got no better solution. Vladimir smime.p7s Description: S/MIME Cryptographic Signature

Re: [Nix-dev] fetchFromGithub

2015-05-31 Thread Kirill Elagin
I believe everyone just puts some random hash and then copy-pastes the right one from the error message. (See also https://github.com/NixOS/nixpkgs/issues/6750) On Mon, Jun 1, 2015 at 4:44 AM Arseniy Seroka ars.ser...@gmail.com wrote: Hello! What is a proper way to get pkg's sha if I use

[Nix-dev] fetchFromGithub

2015-05-31 Thread Arseniy Seroka
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

Re: [Nix-dev] fetchFromGithub

2015-05-31 Thread Arseniy Seroka
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

Re: [Nix-dev] fetchFromGithub

2015-05-31 Thread Eric Seidel
`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