nix-community / vgo2nix

Convert go.mod files to nixpkgs buildGoPackage compatible deps.nix files [maintainer=@adisbladis]
MIT License
90 stars 21 forks source link

WIP: Use longer hash from the result of the fetch #34

Open tomberek opened 4 years ago

tomberek commented 4 years ago

Working on using longer hashes. This seems to provide hashes from the nix-prefetch-git, but i'm new to this codebase so I have no idea what else i'm breaking.

Fixes #29 (in progress)

tomberek commented 4 years ago

Then this change in nixpkgs seems to make the system work:

diff --git a/pkgs/development/go-packages/generic/default.nix b/pkgs/development/go-packages/generic/default.nix
index 2de234c9a1e..e710ee04ab5 100644
--- a/pkgs/development/go-packages/generic/default.nix
+++ b/pkgs/development/go-packages/generic/default.nix
@@ -49,8 +49,8 @@ let
     {
       inherit (goDep) goPackagePath;
       src = if goDep.fetch.type == "git" then
-        fetchgit {
-          inherit (goDep.fetch) url rev sha256;
+        builtins.fetchGit {
+          inherit (goDep.fetch) url rev ;
         }
       else if goDep.fetch.type == "hg" then
         fetchhg {

Seems to fail on non-master branches.

tomberek commented 4 years ago

Relevant: https://github.com/NixOS/nix/pull/3408

SuperSandro2000 commented 3 years ago

@tomberek Is this still required after the recent changes?