Unverified Commit e70e4b5d authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

cyme: 1.8.5 -> 2.1.2 (#384754)

parents d8a4e9d3 ff707f8b
Loading
Loading
Loading
Loading
+17 −23
Original line number Diff line number Diff line
@@ -5,25 +5,23 @@
  pkg-config,
  stdenv,
  darwin,
  libusb1,
  versionCheckHook,
  nix-update-script,
  testers,
  cyme,
}:

rustPlatform.buildRustPackage rec {
  pname = "cyme";
  version = "1.8.5";
  version = "2.1.2";

  src = fetchFromGitHub {
    owner = "tuna-f1sh";
    repo = "cyme";
    rev = "v${version}";
    hash = "sha256-4lnW6p7MaAZdvyXddIoB8TuEQSCmBYOwyvOA1r2ZKxk=";
    hash = "sha256-KAHCeM1rAPGi98PrcVJtzkhTWGWFwf37VuSQTjqXSEg=";
  };

  useFetchCargoVendor = true;
  cargoHash = "sha256-eUBhMI/ff99SEU76yYvCzEvyLHtQqXgk/bHqmxPQlnc=";
  cargoHash = "sha256-LwBTDBrsigt8H6PFuuGndiMlj5d8v68dyHipVYOGKVk=";

  nativeBuildInputs =
    [
@@ -33,26 +31,22 @@ rustPlatform.buildRustPackage rec {
      darwin.DarwinTools
    ];

  buildInputs = [
    libusb1
  ];

  checkFlags =
    [
  checkFlags = [
    # doctest that requires access outside sandbox
    "--skip=udev::hwdb::get"
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # system_profiler is not available in the sandbox
    # - system_profiler is not available in the sandbox
    # - workaround for "Io Error: No such file or directory"
    "--skip=test_run"
  ];

  passthru = {
    updateScript = nix-update-script { };
    tests.version = testers.testVersion {
      package = cyme;
    };
  };
  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  doInstallCheck = true;
  versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
  versionCheckProgramArg = [ "--version" ];

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
    homepage = "https://github.com/tuna-f1sh/cyme";