{ stdenv, fetchurl, runCommand, fetchFromGitHub, rustPlatform, Security }: rustPlatform.buildRustPackage rec { pname = "cargo-make"; version = "0.22.1"; src = let source = fetchFromGitHub { owner = "sagiegurari"; repo = pname; rev = version; sha256 = "1wsams41zl56mkb8671n5fqkkchs68jd9nvfzry8axxiv7n175gc"; }; cargo-lock = fetchurl { url = "https://gist.githubusercontent.com/xrelkd/e4c9c7738b21f284d97cb7b1d181317d/raw/850e9830f4ab4bc65da6eb5cd8b0911970a7739f/cargo-make-Cargo.lock"; sha256 = "0knmzplxmh8vksmpg56l2p1a10hpqbr9hmbk3hv0aj63125rhhqy"; }; 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 = "18j0nflf997z4nwdxifxp1ji1rbwqbg6zm2256j21am4ak45krsy"; # 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; }; }