{ stdenv, fetchurl, runCommand, fetchFromGitHub, rustPlatform, Security }: rustPlatform.buildRustPackage rec { pname = "cargo-make"; version = "0.22.0"; src = let source = fetchFromGitHub { owner = "sagiegurari"; repo = pname; rev = version; sha256 = "13nl370immbhjarc0vfzrsflml3alh2f2zrh4znbks4yc3yp790z"; }; cargo-lock = fetchurl { url = "https://gist.githubusercontent.com/xrelkd/e4c9c7738b21f284d97cb7b1d181317d/raw/d31cfb3598d0a2886abd4d2ed43a02d493c8de8c/cargo-make-Cargo.lock"; sha256 = "08fzl98d277n9xn3hrg9jahkqwdjfi5saajsppwzdbb3l7xw4jh2"; }; 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 = "0gj4a15slxnp31mlfgh57h3cwv0lnw5gdmkrmmj79migi96i5i6y"; # 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; }; }