about summary refs log tree commit diff
path: root/pkgs/development/tools/rust
diff options
context:
space:
mode:
authorKevin Cox <kevincox@kevincox.ca>2017-08-05 15:38:48 +0100
committerzimbatm <zimbatm@zimbatm.com>2017-10-23 00:30:47 +0100
commit5f8cf0048ea089fa73d17512fc4f9f0f0644e225 (patch)
tree7a9bfc449fab89da9af7b012d4b55ea809eb102d /pkgs/development/tools/rust
parentd170c2ceadde34a1ee4844fe59d876351331b707 (diff)
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>
Diffstat (limited to 'pkgs/development/tools/rust')
-rw-r--r--pkgs/development/tools/rust/bindgen/default.nix2
-rw-r--r--pkgs/development/tools/rust/racer/default.nix2
-rw-r--r--pkgs/development/tools/rust/racerd/default.nix2
-rw-r--r--pkgs/development/tools/rust/rainicorn/default.nix3
-rw-r--r--pkgs/development/tools/rust/rustfmt/default.nix2
-rw-r--r--pkgs/development/tools/rust/rustup/default.nix2
6 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/development/tools/rust/bindgen/default.nix b/pkgs/development/tools/rust/bindgen/default.nix
index 78a327c9ea15b..1240e7cc38f45 100644
--- a/pkgs/development/tools/rust/bindgen/default.nix
+++ b/pkgs/development/tools/rust/bindgen/default.nix
@@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
     wrapProgram $out/bin/bindgen --set LIBCLANG_PATH "${llvmPackages.clang-unwrapped}/lib"
   '';
 
-  depsSha256 = "06b5zyw9p7h73h30c1nlnwjb0zmkfx52wqsl9b14y9hx51g9bw0r";
+  cargoSha256 = "128skg31lc9v8i7ghfb3wyiazivqfvzhi1mvmjcl0gkx1hi5006v";
 
   doCheck = false; # A test fails because it can't find standard headers in NixOS
 
diff --git a/pkgs/development/tools/rust/racer/default.nix b/pkgs/development/tools/rust/racer/default.nix
index 89c384eb6ecaa..57b685e946d0d 100644
--- a/pkgs/development/tools/rust/racer/default.nix
+++ b/pkgs/development/tools/rust/racer/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "06k50f2vj2w08afh3nrlhs0amcvw2i45bhfwr70sgs395xicjswp";
   };
 
-  depsSha256 = "1gywnjbjl9jalbq6wkfmbczav4qbhgw2h8lyxkyppnhw9y4j0nc1";
+  cargoSha256 = "1w5imxyqlyv24dvzncq6dy01zn2x8p1aciyvzh8ac1x1wdjcacjc";
 
   buildInputs = [ makeWrapper ];
 
diff --git a/pkgs/development/tools/rust/racerd/default.nix b/pkgs/development/tools/rust/racerd/default.nix
index b2340e01c1a5f..f3cb4e789502e 100644
--- a/pkgs/development/tools/rust/racerd/default.nix
+++ b/pkgs/development/tools/rust/racerd/default.nix
@@ -14,7 +14,7 @@ buildRustPackage rec {
 
   doCheck = false;
 
-  depsSha256 = "0db18m0vxzvg821gb5g8njhlnxw7im81m089i4982n8hmnhm1497";
+  cargoSha256 = "1h7hm7vkk1grah6pn5ydfi5pzc2kd48lh2kxim5jlvrxhd2dingg";
 
   buildInputs = [ makeWrapper ];
 
diff --git a/pkgs/development/tools/rust/rainicorn/default.nix b/pkgs/development/tools/rust/rainicorn/default.nix
index b6cbeb88402bc..370318d1ff299 100644
--- a/pkgs/development/tools/rust/rainicorn/default.nix
+++ b/pkgs/development/tools/rust/rainicorn/default.nix
@@ -13,9 +13,10 @@ buildRustPackage rec {
     sha256 = "07vh4g120sx569wkzclq91blkkd7q7z582pl8vz0li1l9ij8md01";
   };
 
-  depsSha256 = "1ckrf77s1glrqi0gvrv9wqmip4i97dk0arn0iz87jg4q2wfss85k";
+  cargoSha256 = "14kd25mw6m20blqcr221cclcqxw0j229zxq8hsaay6q7jgv0c7a0";
 
   meta = with stdenv.lib; {
+    broken = true;
     description = "Rust IDEs.  parse-analysis";
     homepage = https://github.com/RustDT/Rainicorn;
     license = with licenses; [ mit asl20 ];
diff --git a/pkgs/development/tools/rust/rustfmt/default.nix b/pkgs/development/tools/rust/rustfmt/default.nix
index 0e3802a214f15..b8585dace5446 100644
--- a/pkgs/development/tools/rust/rustfmt/default.nix
+++ b/pkgs/development/tools/rust/rustfmt/default.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
     sha256 = "12l3ff0s0pzhcf5jbs8wqawjk4jghhhz8j6dq1n5201yvny12jlr";
   };
 
-  depsSha256 = "1nnb2lpzjf6hv1a7cw3cbkc22fb54rsp6h87wzmqi4hsy1csff7a";
+  cargoSha256 = "0gppki9mgx99xipapg36ydwk1bplygnz6sbyzbg46vhn10iggfwm";
 
   meta = with stdenv.lib; {
     description = "A tool for formatting Rust code according to style guidelines";
diff --git a/pkgs/development/tools/rust/rustup/default.nix b/pkgs/development/tools/rust/rustup/default.nix
index 59cdf443f4ab5..65599ad8d18fb 100644
--- a/pkgs/development/tools/rust/rustup/default.nix
+++ b/pkgs/development/tools/rust/rustup/default.nix
@@ -6,7 +6,7 @@ rustPlatform.buildRustPackage rec {
   name = "rustup-${version}";
   version = "1.3.0";
 
-  depsSha256 = "078hssgffgpakv735p1xg60kic151r2dvpdr9sipb63lwqr4dxfb";
+  cargoSha256 = "1yd7k0jpx78p5bp6iyzgbyj7pjz8vyjg9g7fmf1bl60jsbdpgv3g";
 
   src = fetchFromGitHub {
     owner = "rust-lang-nursery";