bobvanderlinden / nixpkgs-ruby

A Nix repository with all Ruby versions being kept up-to-date automatically

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hash mismatch in fixed-output derivation

thecatwasnot opened this issue · comments

commented

Thank you for this work, it's exactly what I was looking for. I'm attempting to set up a new ruby project and it seems nix won't build rubygems-3.2.33. I've begun with the flake.nix as it comes from the template:

direnv: using flake
error: hash mismatch in fixed-output derivation '/nix/store/c9iwn5xlnfrjmdimhrkwnxyplh57fmy5-0b5bcc8075deaedf692ac0d720ee03e0ca4dabc9.patch.drv':
         specified: sha256-hCHOGztZB67vB3hJ6lKdsgiUBw4SdhLQpFZbxKEOSjI=
            got:    sha256-MsZ4NkAIPb6H0/JmYloGYtAdiZg5VHdewelZTX4KM1M=
error: 1 dependencies of derivation '/nix/store/cb9mj3nwwp07y3fy7l0ar7lhdsmpv896-rubygems-3.2.33.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8yahg5ycqpajj8l5q43hdybrczjsdgyh-ruby-3.1.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bqrfw7s1wbckjxfmvqzr00szj5sfjh6a-nix-shell-env.drv' failed to build
direnv: nix-direnv: renewed cache
direnv: export ~XDG_DATA_DIRS
(15:36:26)(cole)cat flake.nix
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
    nixpkgs-ruby.url = "github:bobvanderlinden/nixpkgs-ruby";
    nixpkgs-ruby.inputs.nixpkgs.follows = "nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, nixpkgs-ruby, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
        rubyVersion = nixpkgs.lib.fileContents ./.ruby-version;
        ruby = nixpkgs-ruby.lib.mkRuby { inherit pkgs rubyVersion; };

        gems = pkgs.bundlerEnv {
          name = "gemset";
          inherit ruby;
          gemfile = ./Gemfile;
          lockfile = ./Gemfile.lock;
          gemset = ./gemset.nix;
          groups = [ "default" "production" "development" "test" ];
        };
      in
      {
        devShell = with pkgs;
          mkShell {
            buildInputs = [
              # gems
              ruby
              bundix
            ];
          };

I'm using direnv and nix-direnv with

(15:52:58)(cole))nix --version
nix (Nix) 2.12.0

This should be solved now that #23 is merged.