Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / ca / cargo-information / package.nix
blob028d6f1a83852401c04cae6d3a6012d86cd84ef0
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , makeWrapper
5 , pkg-config
6 , openssl
7 , rustc
8 , stdenv
9 , darwin
12 rustPlatform.buildRustPackage rec {
13   pname = "cargo-information";
14   version = "0.6.0";
16   src = fetchFromGitHub {
17     owner = "hi-rustin";
18     repo = "cargo-information";
19     rev = "v${version}";
20     hash = "sha256-5F8O8M8cz7sdXtqGYuDIeTolovZjx2BLEBCZuBIb9YA=";
21   };
23   cargoLock = {
24     lockFile = ./Cargo.lock;
25     outputHashes = {
26       "cargo-test-macro-0.1.0" = "sha256-4u3Ium+WYBdyocuehDulRgUOR74JC6AUI2+A5xlnUGw=";
27     };
28   };
30   checkFlags = [
31     # Require network access
32     "--skip=cargo_information::specify_version_within_ws_and_match_with_lockfile::case"
33     "--skip=cargo_information::within_ws::case"
34     "--skip=cargo_information::within_ws_with_alternative_registry::case"
35     "--skip=cargo_information::within_ws_without_lockfile::case"
36     "--skip=cargo_information::transitive_dependency_within_ws::case"
37   ];
39   nativeBuildInputs = [
40     pkg-config
41     makeWrapper
42   ];
44   buildInputs = [
45     openssl
46   ] ++ lib.optionals stdenv.isDarwin [
47     darwin.apple_sdk.frameworks.Security
48   ];
50   postFixup = ''
51     wrapProgram $out/bin/cargo-info \
52       --prefix PATH : ${lib.makeBinPath [ rustc ]}
53   '';
55   meta = with lib; {
56     description = "Cargo subcommand to show information about crates";
57     mainProgram = "cargo-info";
58     homepage = "https://github.com/hi-rustin/cargo-information";
59     changelog = "https://github.com/hi-rustin/cargo-information/blob/v${src.rev}/CHANGELOG.md";
60     license = licenses.mit;
61     maintainers = with maintainers; [ eopb ];
62   };