Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

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

Open
tomberek wants to merge 1 commit intonix-community:masterfrom
tomberek:tom/longsha
Open

WIP: Use longer hash from the result of the fetch#34
tomberek wants to merge 1 commit intonix-community:masterfrom
tomberek:tom/longsha

Conversation

@tomberek
Copy link
Copy Markdown

@tomberek tomberek commented Apr 4, 2020

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
Copy link
Copy Markdown
Author

tomberek commented Apr 4, 2020

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
Copy link
Copy Markdown
Author

tomberek commented Apr 4, 2020

Relevant: NixOS/nix#3408

@SuperSandro2000
Copy link
Copy Markdown
Member

@tomberek Is this still required after the recent changes?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace truncated commitishes with full ones

2 participants