ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / ca / cargo-deb / package.nix
blob59ecbd5bfdc61103afd38648a871f08c6c7dc558
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   makeWrapper,
6   dpkg,
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "cargo-deb";
11   version = "2.7.0";
13   src = fetchFromGitHub {
14     owner = "kornelski";
15     repo = pname;
16     rev = "v${version}";
17     hash = "sha256-ReXDrbFY2qY/0TUYD+EiP9Qa9KwMGb9iLL+tdfDLSpc=";
18   };
20   cargoHash = "sha256-yBMeiYWsb+D8WzWRDDi9JFZTFvQAQ7QUeGDb6yFelD8=";
22   nativeBuildInputs = [
23     makeWrapper
24   ];
26   checkFlags = [
27     # This is an FHS specific assert depending on glibc location
28     "--skip=dependencies::resolve_test"
29     "--skip=run_cargo_deb_command_on_example_dir_with_separate_debug_symbols"
30     # The following tests require empty CARGO_BUILD_TARGET env variable, but we
31     # set it ever since https://github.com/NixOS/nixpkgs/pull/298108.
32     "--skip=build_with_command_line_compress_gz"
33     "--skip=build_with_command_line_compress_xz"
34     "--skip=build_with_explicit_compress_type_gz"
35     "--skip=build_with_explicit_compress_type_xz"
36     "--skip=build_workspaces"
37     "--skip=cwd_dir1"
38     "--skip=cwd_dir2"
39     "--skip=cwd_dir3"
40     "--skip=run_cargo_deb_command_on_example_dir"
41     "--skip=run_cargo_deb_command_on_example_dir_with_variant"
42     "--skip=run_cargo_deb_command_on_example_dir_with_version"
43   ];
45   postInstall = ''
46     wrapProgram $out/bin/cargo-deb \
47       --prefix PATH : ${lib.makeBinPath [ dpkg ]}
48   '';
50   meta = with lib; {
51     description = "Cargo subcommand that generates Debian packages from information in Cargo.toml";
52     mainProgram = "cargo-deb";
53     homepage = "https://github.com/kornelski/cargo-deb";
54     license = licenses.mit;
55     maintainers = with maintainers; [
56       Br1ght0ne
57       matthiasbeyer
58     ];
59   };