1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 10:31:36 +00:00
nixpkgs/pkgs/development/tools/rust/cargo-make/default.nix
2019-06-27 12:37:48 +08:00

44 lines
1.3 KiB
Nix

{ stdenv, fetchurl, runCommand, fetchFromGitHub, rustPlatform, Security }:
rustPlatform.buildRustPackage rec {
pname = "cargo-make";
version = "0.21.0";
src =
let
source = fetchFromGitHub {
owner = "sagiegurari";
repo = pname;
rev = version;
sha256 = "02hxf0mbk4nj9ja1z70k8fskh1kl3pixwy7gx0si5fbp9rmn04wk";
};
cargo-lock = fetchurl {
url = "https://gist.githubusercontent.com/xrelkd/e4c9c7738b21f284d97cb7b1d181317d/raw/b6017fd825b52987ac7c3b65620917e5d567312b/cargo-make-Cargo.lock";
sha256 = "15ajxza58bbviwjxl98c0z89w4430902j0z46b594nbm02kv2ad9";
};
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 = "1fsfjavad1cbq1xvck2j5vyppxck606cpmqrwbs4fjvdmlbgx3gp";
# 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;
};
}