2019-05-11 03:50:30 +01:00
|
|
|
{ stdenv, fetchurl, runCommand, fetchFromGitHub, rustPlatform, Security }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-make";
|
2019-06-16 15:51:51 +01:00
|
|
|
version = "0.20.0";
|
2019-05-11 03:50:30 +01:00
|
|
|
|
|
|
|
src =
|
|
|
|
let
|
|
|
|
source = fetchFromGitHub {
|
|
|
|
owner = "sagiegurari";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-06-16 15:51:51 +01:00
|
|
|
sha256 = "0hf8g91iv4c856whaaqrv5s8z56gi3086pva6vdwmn75gwxkw7zk";
|
2019-05-11 03:50:30 +01:00
|
|
|
};
|
|
|
|
cargo-lock = fetchurl {
|
2019-06-16 15:51:51 +01:00
|
|
|
url = "https://gist.githubusercontent.com/xrelkd/e4c9c7738b21f284d97cb7b1d181317d/raw/8b4ca42376199d4e4781473b4112ef8f18bbd1cc/cargo-make-Cargo.lock";
|
|
|
|
sha256 = "1zffq7r1cnzdqw4d3vdvlwj56pfak9gj14ibn1g0j7lncwxw2dgs";
|
2019-05-11 03:50:30 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
runCommand "cargo-make-src" {} ''
|
|
|
|
cp -R ${source} $out
|
|
|
|
chmod +w $out
|
|
|
|
cp ${cargo-lock} $out/Cargo.lock
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2019-06-16 15:51:51 +01:00
|
|
|
cargoSha256 = "1r2fiwcjf739rkprrwidgsd9i5pjgk723ipazmlccz2jpwbrk7zr";
|
2019-05-11 03:50:30 +01: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";
|
|
|
|
homepage = https://github.com/sagiegurari/cargo-make;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ xrelkd ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|