Skip to content

Commit

Permalink
Merge pull request NixOS#263017 from h7x4/init-cyme
Browse files Browse the repository at this point in the history
cyme: init at 1.5.0
  • Loading branch information
wegank authored Oct 25, 2023
2 parents a26197b + a3ba001 commit 6e68f70
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions pkgs/by-name/cy/cyme/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib
, fetchFromGitHub
, rustPlatform
, pkg-config
, stdenv
, darwin
, libusb1
, udev
, nix-update-script
}:

rustPlatform.buildRustPackage rec {
pname = "cyme";
version = "1.5.0";

src = fetchFromGitHub {
owner = "tuna-f1sh";
repo = "cyme";
rev = "v${version}";
hash = "sha256-UXh97pHJ9wa/xSslHLB7WVDwLKJYvLPgmPX8RvKrsTI=";
};

cargoHash = "sha256-hSd53K50Y4K/fYGfsT2fHUaipVSpeYN6/EOFlv4ocuE=";

nativeBuildInputs = [
pkg-config
] ++ lib.optionals stdenv.isDarwin [
darwin.DarwinTools
];

buildInputs = [
libusb1
] ++ lib.optionals stdenv.isLinux [
udev
];

checkFlags = lib.optionals stdenv.isDarwin [
# system_profiler is not available in the sandbox
"--skip=test_run"
];

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

meta = with lib; {
homepage = "https://github.com/tuna-f1sh/cyme";
description = "A modern cross-platform lsusb";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ h7x4 ];
platforms = platforms.linux ++ platforms.darwin ++ platforms.windows;
mainProgram = "cyme";
};
}

0 comments on commit 6e68f70

Please sign in to comment.