lol
1{ lib
2, rustPlatform
3, fetchFromGitHub
4, makeWrapper
5, dpkg
6}:
7
8rustPlatform.buildRustPackage rec {
9 pname = "cargo-deb";
10 version = "1.42.2";
11
12 src = fetchFromGitHub {
13 owner = "kornelski";
14 repo = pname;
15 rev = "v${version}";
16 hash = "sha256-s/piZ8sCdBz5zFW9i7xdVrf7dQiMjQp/ixCDjFh5SLc=";
17 };
18
19 cargoHash = "sha256-4iJghmSXsaijNCvYyrM3dEsqCDk6zeTU92oP5Qs6tOY=";
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 ];
29
30 postInstall = ''
31 wrapProgram $out/bin/cargo-deb \
32 --prefix PATH : ${lib.makeBinPath [ dpkg ]}
33 '';
34
35 meta = with lib; {
36 description = "A cargo subcommand that generates Debian packages from information in Cargo.toml";
37 homepage = "https://github.com/kornelski/cargo-deb";
38 license = licenses.mit;
39 maintainers = with maintainers; [ Br1ght0ne matthiasbeyer ];
40 };
41}