1{ lib
2, rustPlatform
3, fetchFromGitHub
4, pkg-config
5, bzip2
6, openssl
7, stdenv
8, darwin
9}:
10
11rustPlatform.buildRustPackage rec {
12 pname = "cargo-make";
13 version = "0.37.4";
14
15 src = fetchFromGitHub {
16 owner = "sagiegurari";
17 repo = "cargo-make";
18 rev = version;
19 hash = "sha256-ZcigUYHNhzLFXA726FqalSt0hIzBVBvmep8jqzaCioc=";
20 };
21
22 cargoHash = "sha256-hmEo5UQlVtgdmb6b/vhK5GHHUCgbEKdnAu2S+xrDpuk=";
23
24 nativeBuildInputs = [ pkg-config ];
25
26 buildInputs = [
27 bzip2
28 openssl
29 ] ++ lib.optionals stdenv.isDarwin [
30 darwin.apple_sdk.frameworks.SystemConfiguration
31 ];
32
33 # Some tests fail because they need network access.
34 # However, Travis ensures a proper build.
35 # See also:
36 # https://travis-ci.org/sagiegurari/cargo-make
37 doCheck = false;
38
39 meta = with lib; {
40 description = "A Rust task runner and build tool";
41 homepage = "https://github.com/sagiegurari/cargo-make";
42 changelog = "https://github.com/sagiegurari/cargo-make/blob/${version}/CHANGELOG.md";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ figsoda xrelkd ];
45 mainProgram = "cargo-make";
46 };
47}