Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

darling: Update hash #101799

Closed
wants to merge 1 commit into from
Closed

darling: Update hash #101799

wants to merge 1 commit into from

Conversation

@nasyxx
Copy link

@nasyxx nasyxx commented Oct 26, 2020

No description provided.

@veprbl
Copy link
Member

@veprbl veprbl commented Nov 19, 2020

# cat darling.nix
with import <nixpkgs> {};

fetchzip {
   url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz";
   sha256 = "0krlrb75fcfa52kx1nvlpyxk060zk2931hfw6g86k5nmzfv9hyxa";
   postFetch = ''
     # Get rid of case conflict
     mkdir $out
    cd $out
    tar -xzf $downloadedFile --strip-components=1
    rm -r $out/src/libm
  '';
}
# nix-build darling.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/4f3475b113c93d204992838aecafa89b1b3ccfde.tar.gz
these derivations will be built:
  /nix/store/3gsv7n0n25h7f9k6vmnq42ssjlbyk823-source.drv
building '/nix/store/3gsv7n0n25h7f9k6vmnq42ssjlbyk823-source.drv'...

trying https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   159  100   159    0     0    703      0 --:--:-- --:--:-- --:--:--   706
100 12.5M    0 12.5M    0     0  5154k      0 --:--:--  0:00:02 --:--:-- 5967k
hash mismatch in fixed-output derivation '/nix/store/a18g6gvfs8xbw33a9hq9nh3g3sl8r83p-source':
  wanted: sha256:0krlrb75fcfa52kx1nvlpyxk060zk2931hfw6g86k5nmzfv9hyxa
  got:    sha256:11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf
error: build of '/nix/store/3gsv7n0n25h7f9k6vmnq42ssjlbyk823-source.drv' failed

@nasyxx
Copy link
Author

@nasyxx nasyxx commented Nov 19, 2020

Hi, I see, but it is different on my macOS.

IMAGE 2020-11-19 18:03:50

For the darling package, will the hash change if my NIX_STORE_DIR is not the /nix/store?

Will the hash change if I build from the source always?

@veprbl
Copy link
Member

@veprbl veprbl commented Nov 20, 2020

I managed to build the derivation on a linux system with your hash. My guess was that this has to do with case sensitivity of the filesystem.

% find result/ | tr '[:upper:]' '[:lower:]' | sort | uniq -d
result/src/opendirectory

We could use a following workaround (below is running on linux with case-sensitive FS):

# cat darling.nix 
with import <nixpkgs> {};

fetchzip {
   url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz";
   sha256 = "0krlrb75fcfa52kx1nvlpyxk060zk2931hfw6g86k5nmzfv9hyxa";
   postFetch = ''
     # Get rid of case conflict
     mkdir $out
    cd $out
    tar -xzf $downloadedFile --strip-components=1
    rm -r $out/src/libm

    # A workaround for case-sensitive filesystems
    mv src/opendirectory/* src/OpenDirectory/
    rmdir src/opendirectory
  '';
}
# nix-build darling.nix                                                                     
these derivations will be built:
  /direct/star+u/veprbl/nix/store/bz7gaqvm0s9zmn66frkilhrlpa5b7qqj-source.drv
building '/direct/star+u/veprbl/nix/store/bz7gaqvm0s9zmn66frkilhrlpa5b7qqj-source.drv'...

trying https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   159  100   159    0     0   1186      0 --:--:-- --:--:-- --:--:--  1177
100 12.5M    0 12.5M    0     0  5197k      0 --:--:--  0:00:02 --:--:-- 6128k
hash mismatch in fixed-output derivation '/direct/star+u/veprbl/nix/store/b2q69zj566wqhy0rg0ff6j6clqrzwb46-source':
  wanted: sha256:0krlrb75fcfa52kx1nvlpyxk060zk2931hfw6g86k5nmzfv9hyxa
  got:    sha256:11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf
error: build of '/direct/star+u/veprbl/nix/store/bz7gaqvm0s9zmn66frkilhrlpa5b7qqj-source.drv' failed

@nasyxx
Copy link
Author

@nasyxx nasyxx commented Nov 20, 2020

Get it! Thank you very much!

@nasyxx nasyxx closed this Nov 20, 2020
@nasyxx nasyxx deleted the patch-1 branch Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants