Skip to content

Instantly share code, notes, and snippets.

@emptyflask
Last active August 26, 2019 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emptyflask/c9750b05386efc132fe91c19d7144a0e to your computer and use it in GitHub Desktop.
Save emptyflask/c9750b05386efc132fe91c19d7144a0e to your computer and use it in GitHub Desktop.
nix-hash mismatch when using git repo
with (import <nixpkgs> {});
let
rubyenv = bundlerEnv {
name = "id-env";
# Setup for ruby gems using bundix generated gemset.nix
inherit ruby_2_5;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
# Bundler groups available in this environment
groups = ["default" "development" "test" "toolbox"];
};
in stdenv.mkDerivation {
name = "id";
version = "0.0.1";
buildInputs = [
stdenv
git
rubyenv.wrappedRuby
bundler
bundix
nodejs
yarn
rubyenv
];
}
GIT
remote: https://xxxxxxxxxxx:x-oauth-basic@github.com/emptyflask/capistrano-plugin.git
revision: a1224c9b06fe402ee97c089a942e9c9f87d9d6b0
tag: v0.0.4
specs:
capistrano-plugin (0.0.4)
capistrano (~> 3.1)
json
{
capistrano-plugin = {
dependencies = ["capistrano" "json"];
groups = ["toolbox"];
platforms = [];
source = {
fetchSubmodules = false;
rev = "a1224c9b06fe402ee97c089a942e9c9f87d9d6b0";
sha256 = "0mjiq5p91mz136ic9158rfdv6qfpxkq4qdj52lhgrmcb5fcq5grx";
type = "git";
url = "https://xxxxxxxxxxx:x-oauth-basic@github.com/emptyflask/capistrano-plugin.git";
};
version = "0.0.4";
};
}
hash mismatch in fixed-output derivation '/nix/store/45mhja9zfzb67lc251nm4g6zbjs5m074-capistrano-plugin-a1224c9':
wanted: sha256:0mjiq5p91mz136ic9158rfdv6qfpxkq4qdj52lhgrmcb5fcq5grx
got: sha256:0lslj0wpkk5fis6fc0qp5piqb2w6vc6npnx80z2qja6583davasx
building '/nix/store/plxx37pbx2rvf2aday9qlkj5w50jfhbb-elasticsearch-transport-5.0.5.gem.drv'...
cannot build derivation '/nix/store/mykvwiibhjsb5brjnwffi84v205fbnrw-ruby2.5.5-capistrano-plugin-0.0.4.drv': 1 dependencies couldn't be built
---
❯ nix-prefetch-git --url https://xxxxxxxxxxx:x-oauth-basic@github.com/emptyflask/capistrano-plugin.git --rev a1224c9b06fe402ee97c089a942e9c9f87d9d6b0 --hash sha256
Initialized empty Git repository in /tmp/git-checkout-tmp-Xd6E6Eie/capistrano-plugin-a1224c9/.git/
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 15 (delta 0), reused 10 (delta 0), pack-reused 0
Unpacking objects: 100% (15/15), done.
From https://github.com/emptyflask/capistrano-plugin
* branch HEAD -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
git revision is a1224c9b06fe402ee97c089a942e9c9f87d9d6b0
path is /nix/store/nbzyxmgh10n8pqpwk58fbsyq4d8rf41f-capistrano-plugin-a1224c9
git human-readable version is -- none --
Commit date is 2019-08-22 15:12:32 -0500
hash is 0mjiq5p91mz136ic9158rfdv6qfpxkq4qdj52lhgrmcb5fcq5grx
{
"url": "https://xxxxxxxxxxx:x-oauth-basic@github.com/emptyflask/capistrano-plugin.git",
"rev": "a1224c9b06fe402ee97c089a942e9c9f87d9d6b0",
"date": "2019-08-22T15:12:32-05:00",
"sha256": "0mjiq5p91mz136ic9158rfdv6qfpxkq4qdj52lhgrmcb5fcq5grx",
"fetchSubmodules": false
}
--
❯ ls /nix/store|grep capistrano-plugin
45mhja9zfzb67lc251nm4g6zbjs5m074-capistrano-plugin-a1224c9/
45mhja9zfzb67lc251nm4g6zbjs5m074-capistrano-plugin-a1224c9.lock
mykvwiibhjsb5brjnwffi84v205fbnrw-ruby2.5.5-capistrano-plugin-0.0.4.drv
nbzyxmgh10n8pqpwk58fbsyq4d8rf41f-capistrano-plugin-a1224c9.lock
rcwsd5a2xkcwnfzlgmyvs710by6wbk37-capistrano-plugin-a1224c9.drv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment