Unverified Commit e7572dfb authored by Acid Bong's avatar Acid Bong
Browse files

genemichaels: switch to fetchCrate

This way we can avoid tests failing due to unstable libraries in the
workspace (they'll be replaced by stable versions from Crates)
parent 616f4cdf
Loading
Loading
Loading
Loading
+5 −14
Original line number Diff line number Diff line
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  fetchCrate,
}:

rustPlatform.buildRustPackage rec {
  pname = "genemichaels";
  version = "0.5.13";

  src = fetchFromGitHub {
    owner = "andrewbaxter";
    repo = "genemichaels";
    rev = "genemichaels-v${version}";
    hash = "sha256-pzGTKswETm7RR0up1eSWC+X633rsVmEAJ3DYM8z6paQ=";
  src = fetchCrate {
    inherit pname version;
    hash = "sha256-ZJr5cN+Bam71fPDwhcYUVop5JW8145tzY7Sk75fjhvQ=";
  };

  cargoHash = "sha256-J7uibeoIKLC3jo5TstzC8udK+miAA52321eapOHVzbM=";

  cargoBuildFlags = [ "--package ${pname}" ];
  # cargoTestFlags is not used because genemichaels is tightly coupled to the
  # other crates in the workspace and by not setting it, we run all the tests.
  # If a dependency crate is failing its tests, we want to know about it. For
  # example, between versions 0.5.8 and 0.5.12, there was a failing test in one
  # of the other workspace members that genemichaels depends on.
  cargoHash = "sha256-SVJ3vXa2yNhdayUsYNpXSqLrMzi4JzjKuh0VTteIOLs=";

  meta = {
    description = "Even formats macros";