{ stdenv, fetchurl, runCommand, fetchFromGitHub, rustPlatform, Security }: rustPlatform.buildRustPackage rec { pname = "cargo-make"; version = "0.20.0"; src = let source = fetchFromGitHub { owner = "sagiegurari"; repo = pname; rev = version; sha256 = "0hf8g91iv4c856whaaqrv5s8z56gi3086pva6vdwmn75gwxkw7zk"; }; cargo-lock = fetchurl { url = "https://gist.githubusercontent.com/xrelkd/e4c9c7738b21f284d97cb7b1d181317d/raw/8b4ca42376199d4e4781473b4112ef8f18bbd1cc/cargo-make-Cargo.lock"; sha256 = "1zffq7r1cnzdqw4d3vdvlwj56pfak9gj14ibn1g0j7lncwxw2dgs"; }; 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 ]; cargoSha256 = "1r2fiwcjf739rkprrwidgsd9i5pjgk723ipazmlccz2jpwbrk7zr"; # 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; }; }