Commit 7d63c774 authored by Andrew Marshall's avatar Andrew Marshall
Browse files

ruby: improve failure message when missing cargoHash

Without this, doing e.g. `pkgs.mkRuby` without a `cargoHash` param would
mean that the `fetchCargoTarball` drv was not a FOD and thus had no
network access and would give confusing network failure messages. This
forces specifying non-null `cargoHash` if it is actually being used,
while allowing it to still be `null` when not needed.
parent d8fe5e6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ let
        cargoDeps = if yjitSupport then rustPlatform.fetchCargoTarball {
          inherit (finalAttrs) src;
          sourceRoot = "${finalAttrs.pname}-${version}/${finalAttrs.cargoRoot}";
          hash = cargoHash;
          hash = assert cargoHash != null; cargoHash;
        } else null;

        postUnpack = opString rubygemsSupport ''