Last active
December 23, 2018 11:47
-
-
Save justinwoo/043195b975659099a1b0ea164b77d5fe to your computer and use it in GitHub Desktop.
this derivation always fails for me with nix-build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = import <nixpkgs> {}; | |
name = "psc-package2nix-prefetch-${dep}-${version}"; | |
dep = "simple-json"; | |
repo = "https://github.com/justinwoo/purescript-simple-json.git"; | |
version = "v4.0.0"; | |
in pkgs.runCommand name { | |
buildInputs = with pkgs; [ | |
nix-prefetch-git | |
jq | |
]; | |
} '' | |
RESULT=$(nix-prefetch-git "${repo}" --rev "${version}" --quiet | jq '.sha256' -r) | |
if [ $RESULT == '0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5' ]; then | |
echo "Prefetched revision was empty: ${repo} ${version}"; | |
exit 1; | |
else | |
echo $RESULT > $out; | |
fi | |
'' | |
# always fails with 0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5, an empty fetched result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment