Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, rustPlatform
3, fetchFromGitHub
4, makeWrapper
5, dpkg
6}:
7
8rustPlatform.buildRustPackage rec {
9 pname = "cargo-deb";
10 version = "2.5.1";
11
12 src = fetchFromGitHub {
13 owner = "kornelski";
14 repo = pname;
15 rev = "v${version}";
16 hash = "sha256-COXYXx7C+IDJiw/y+GLY0oJYxtUjnGsikeWUk3z5B48=";
17 };
18
19 cargoHash = "sha256-5iU6jk8yZLVUjksB4g39zBtfm6LTeBgXOLsw/M5CZZc=";
20
21 nativeBuildInputs = [
22 makeWrapper
23 ];
24
25 # This is an FHS specific assert depending on glibc location
26 checkFlags = [
27 "--skip=dependencies::resolve_test"
28 "--skip=run_cargo_deb_command_on_example_dir_with_separate_debug_symbols"
29 ];
30
31 postInstall = ''
32 wrapProgram $out/bin/cargo-deb \
33 --prefix PATH : ${lib.makeBinPath [ dpkg ]}
34 '';
35
36 meta = with lib; {
37 description = "Cargo subcommand that generates Debian packages from information in Cargo.toml";
38 mainProgram = "cargo-deb";
39 homepage = "https://github.com/kornelski/cargo-deb";
40 license = licenses.mit;
41 maintainers = with maintainers; [ Br1ght0ne matthiasbeyer ];
42 };
43}