summaryrefslogtreecommitdiff
path: root/pkgs/by-name/ca/cargo-ament-build/package.nix
blob: d453f34dba96ced1293fc453fbc5d1c1977404dd (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  nix-update-script,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "cargo-ament-build";
  version = "0.1.9";

  src = fetchFromGitHub {
    owner = "ros2-rust";
    repo = "cargo-ament-build";
    tag = "v${finalAttrs.version}";
    hash = "sha256-5D0eB3GCQLgVYuYkHMTkboruiYSAaWy3qZjF/hVpRP0=";
  };

  cargoLock.lockFile = ./Cargo.lock;

  postPatch = ''
    ln -s ${./Cargo.lock} Cargo.lock
  '';

  nativeBuildInputs = [ pkg-config ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Cargo plugin for use with colcon workspaces";
    homepage = "https://github.com/ros2-rust/cargo-ament-build";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ guelakais ];
  };
})