2020-01-24 04:33:58 -08:00
|
|
|
{ stdenv, fetchurl, runCommand, fetchFromGitHub, rustPlatform, Security, openssl, pkg-config }:
|
2019-05-10 19:50:30 -07:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-make";
|
2020-02-06 14:38:30 -08:00
|
|
|
version = "0.27.0";
|
2019-05-10 19:50:30 -07:00
|
|
|
|
|
|
|
src =
|
|
|
|
let
|
|
|
|
source = fetchFromGitHub {
|
|
|
|
owner = "sagiegurari";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-02-06 14:38:30 -08:00
|
|
|
sha256 = "197r7rlgk8csvq612gz4431vvrvyxhcmfswarsdczp4b94pzaa6h";
|
2019-05-10 19:50:30 -07:00
|
|
|
};
|
|
|
|
in
|
|
|
|
runCommand "cargo-make-src" {} ''
|
|
|
|
cp -R ${source} $out
|
|
|
|
chmod +w $out
|
2019-10-15 03:06:39 -07:00
|
|
|
cp ${./Cargo.lock} $out/Cargo.lock
|
2019-05-10 19:50:30 -07:00
|
|
|
'';
|
|
|
|
|
2020-01-24 04:33:58 -08:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-05-10 19:50:30 -07:00
|
|
|
|
2020-01-24 04:33:58 -08:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2020-02-13 18:00:26 -08:00
|
|
|
# Delete this on next update; see #79975 for details
|
|
|
|
legacyCargoFetcher = true;
|
|
|
|
|
2020-02-06 14:38:30 -08:00
|
|
|
cargoSha256 = "02bx8nz8kkr0l8m1b8nfc9576qx9is6s72x4ji3bzwimy76jvx3j";
|
2019-05-10 19:50:30 -07:00
|
|
|
|
|
|
|
# Some tests fail because they need network access.
|
|
|
|
# However, Travis ensures a proper build.
|
|
|
|
# See also:
|
|
|
|
# https://travis-ci.org/sagiegurari/cargo-make
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Rust task runner and build tool";
|
2019-06-26 21:37:48 -07:00
|
|
|
homepage = "https://github.com/sagiegurari/cargo-make";
|
2019-05-10 19:50:30 -07:00
|
|
|
license = licenses.asl20;
|
2019-12-26 06:13:48 -08:00
|
|
|
maintainers = with maintainers; [ xrelkd ];
|
2019-05-10 19:50:30 -07:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|