nixpkgs/pkgs/development/tools/rust/rainicorn/default.nix
Kevin Cox 5f8cf0048e rust: update cargo builder to fetch registry dynamically
The biggest benefit is that we no longer have to update the registry
package. This means that just about any cargo package can be built by
nix. No longer does `cargo update` need to be feared because it will
update to packages newer then what is available in nixpkgs.

Instead of fetching the cargo registry this bundles all the source code
into a "vendor/" folder.

This also uses the new --frozen and --locked flags which is nice.

Currently cargo-vendor only provides binaries for Linux and
macOS 64-bit. This can be solved by building it for the other
architectures and uploading it somewhere (like the NixOS cache).

This also has the downside that it requires a change to everyone's deps
hash. And if the old one is used because it was cached it will fail to
build as it will attempt to use the old version. For this reason the
attribute has been renamed to `cargoSha256`.

Authors:
* Kevin Cox <kevincox@kevincox.ca>
* Jörg Thalheim <Mic92@users.noreply.github.com>
* zimbatm <zimbatm@zimbatm.com>
2017-10-23 00:30:47 +01:00

26 lines
658 B
Nix

{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
with rustPlatform;
buildRustPackage rec {
name = "rainicorn-${version}";
version = "1.0.0";
src = fetchFromGitHub {
owner = "RustDT";
repo = "Rainicorn";
rev = "0f8594079a7f302f4940cc4320f5e4f39f95cdc4";
sha256 = "07vh4g120sx569wkzclq91blkkd7q7z582pl8vz0li1l9ij8md01";
};
cargoSha256 = "14kd25mw6m20blqcr221cclcqxw0j229zxq8hsaay6q7jgv0c7a0";
meta = with stdenv.lib; {
broken = true;
description = "Rust IDEs. parse-analysis";
homepage = https://github.com/RustDT/Rainicorn;
license = with licenses; [ mit asl20 ];
platforms = platforms.all;
};
}