depot/third_party/nixpkgs/pkgs/by-name/ca/cargo-information/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

63 lines
1.6 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeWrapper
, pkg-config
, openssl
, rustc
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-information";
version = "0.6.0";
src = fetchFromGitHub {
owner = "hi-rustin";
repo = "cargo-information";
rev = "v${version}";
hash = "sha256-5F8O8M8cz7sdXtqGYuDIeTolovZjx2BLEBCZuBIb9YA=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"cargo-test-macro-0.1.0" = "sha256-4u3Ium+WYBdyocuehDulRgUOR74JC6AUI2+A5xlnUGw=";
};
};
checkFlags = [
# Require network access
"--skip=cargo_information::specify_version_within_ws_and_match_with_lockfile::case"
"--skip=cargo_information::within_ws::case"
"--skip=cargo_information::within_ws_with_alternative_registry::case"
"--skip=cargo_information::within_ws_without_lockfile::case"
"--skip=cargo_information::transitive_dependency_within_ws::case"
];
nativeBuildInputs = [
pkg-config
makeWrapper
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
postFixup = ''
wrapProgram $out/bin/cargo-info \
--prefix PATH : ${lib.makeBinPath [ rustc ]}
'';
meta = with lib; {
description = "Cargo subcommand to show information about crates";
mainProgram = "cargo-info";
homepage = "https://github.com/hi-rustin/cargo-information";
changelog = "https://github.com/hi-rustin/cargo-information/blob/v${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ eopb ];
};
}