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>
This commit is contained in:
@@ -14,7 +14,7 @@ buildRustPackage rec {
|
||||
sha256 = "0j27qdgyxybaixggh7k57mpm6rifimn4z2vydk463msc8b3kgywj";
|
||||
};
|
||||
|
||||
depsSha256 = "1n57i9wkak76ram748mwq0dn32d041ajd31laqc13c76pp29agrp";
|
||||
cargoSha256 = "1fcl2nnplcic729cmvall2k7wf3jdm7dspvlbxji99bn813ackig";
|
||||
|
||||
buildInputs = [ openssl zeromq czmq zlib ];
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ buildRustPackage rec {
|
||||
sha256 = "0c7ar3pc7n59lzfy74lwz51p09s2bglc870rfr4c0vmc91jl0pj2";
|
||||
};
|
||||
|
||||
depsSha256 = "0wzr8hk63gh3nm8f7dbzwj8pgc3cm8p8mr2q7bbgvri1a5i83sfb";
|
||||
cargoSha256 = "0q3mrcvl1yyrx4a88kanjlfcx6slf7r79i0dh4w81sj6gp07sssm";
|
||||
|
||||
buildInputs = [ openssl zeromq czmq zlib ];
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ buildRustPackage rec {
|
||||
sha256 = "16a5fkpyqkf8w20k3ircc1d0qmif7nygkzxj6mzk9609dlb0dmxq";
|
||||
};
|
||||
|
||||
depsSha256 = "0nax7h7f5qgalgxsfidrxrv1ybl5xvrpc1k7xc1kmaf955gqmc46";
|
||||
cargoSha256 = "0qwbgwxrjc0dvjbpqa59jixy5nq7lng2c1z91rw48qc91v7fa664";
|
||||
|
||||
buildInputs = [ openssl zeromq czmq zlib ];
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ buildRustPackage rec {
|
||||
sha256 = "0qy1g4crhfgs2f5cmrsjv6qscg3r66gb8n6sxhimm9ksivhjyyjp";
|
||||
};
|
||||
|
||||
depsSha256 = "04jlz7nzsmg86i73w75i8rmlbk635xrg8m1dfac8h17dwb29yj6a";
|
||||
cargoSha256 = "0dmn9bccicxhqcj9zrsxxp0vb5ma12a1hs9brpc22n4g1qy4yzcn";
|
||||
|
||||
buildInputs = [ lzo zlib ];
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ buildRustPackage rec {
|
||||
name = "exa-${version}";
|
||||
version = "0.8.0";
|
||||
|
||||
depsSha256 = "0yz41prkjs5rmvdhr9k58a52l7hvwy5mfg8rcpsq4ybgf601lja2";
|
||||
cargoSha256 = "08zzn3a32xfjkmpawcjppn1mr26ws3iv40cckiz8ldz4qc8y9gdh";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ogham";
|
||||
|
||||
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
|
||||
sha256 = "1aw4pgsmvzzqlvbxzv5jnw42nf316qfhvr50b58iqi2dxy8z8cmv";
|
||||
};
|
||||
|
||||
depsSha256 = "17fjlmdwp8582dvv68b5h3zzvmd71yd9sw9xalyrrww46h7fd84g";
|
||||
cargoSha256 = "1v9wg4dq4c7i85bkdhd79bj8gx7200z6np05wsyj2ycbv97p095j";
|
||||
|
||||
meta = {
|
||||
description = "A simple, fast and user-friendly alternative to find";
|
||||
|
||||
@@ -13,7 +13,7 @@ buildRustPackage rec {
|
||||
sha256 = "1fcrbjwnhcz71i70ppy0rcgk5crwwmbkm9nrk1kapvks33pv0az7";
|
||||
};
|
||||
|
||||
depsSha256 = "05mj84a5k65ai492grwg03c3wq6ardhs114bv951fgysc9rs07p5";
|
||||
cargoSha256 = "0kqkzjd90v19qvl3iv1vv2fi8h0z75b0yn0z5jq8w4m94fvh0p95";
|
||||
|
||||
# some tests require a tty, this variable turns them off for Travis CI,
|
||||
# which we can also make use of
|
||||
|
||||
@@ -15,7 +15,7 @@ buildRustPackage rec {
|
||||
|
||||
buildInputs = [ zlib openssl ];
|
||||
|
||||
depsSha256 = "1v7ir56j6biximnnhyvadd98azcj3i5hc8aky0am2nf0swq0jimq";
|
||||
cargoSha256 = "1m4yb7472g1n900dh3xqvdcywk3v01slj3bkk7bk7a9p5x1kyjfn";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A utility for managing cargo dependencies from the command line";
|
||||
@@ -23,5 +23,6 @@ buildRustPackage rec {
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ jb55 ];
|
||||
platforms = platforms.all;
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ buildRustPackage rec {
|
||||
rev = "v${version}";
|
||||
sha256 = "1lmg65yqkwf2a5qxm3dmv8158kqhnriir062vlgar5wimf409rm5";
|
||||
};
|
||||
depsSha256 = "0v145fi9bfiwvsdy7hz9lw4m2f2j8sxvixfzmjwfnq4klm51c8yl";
|
||||
cargoSha256 = "0cxdrzjmqq3ywdh0f5mzkcf50hbbgd3bak4398v2ls5gy5s9fcz2";
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ openssl curl];
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ buildRustPackage rec {
|
||||
sha256 = "1cnvwxbznmsn1gand8hhy5zadax5p67lvm46fkj1a1s89f158w3a";
|
||||
};
|
||||
|
||||
depsSha256 = "1kx9xazhj93xa3cnys39wwr84qqjqrlsbbi5ih71vxppskdpvd6m";
|
||||
cargoSha256 = "00y2vdnrg02clqin9pg57s9micrp66f6y49wq89cmykrfg3r8cwf";
|
||||
|
||||
preFixup = ''
|
||||
mkdir -p "$out/man/man1"
|
||||
|
||||
@@ -11,9 +11,10 @@ rustPlatform.buildRustPackage rec {
|
||||
sha256 = "1zbd1gx0ik2r7bavcid776j37g6rzd3f6cs94kq1qar4gyf1gqjm";
|
||||
};
|
||||
|
||||
depsSha256 = "1gwfkh3ck8n3zcy43ch2mnc28a6y10p3srhnx9dh8gwnwbpb733c";
|
||||
cargoSha256 = "074mfyanwdykg6wci2ia63wcnnyik741g8n624pac215sg4i95h7";
|
||||
|
||||
meta = {
|
||||
broken = true;
|
||||
description = "A command line program that lets you compute statistics from values from a file or standard input";
|
||||
longDescription = ''
|
||||
Staccato (`st` for short) is a command line program that lets you
|
||||
|
||||
@@ -13,7 +13,7 @@ buildRustPackage rec {
|
||||
sha256 = "0z1z3b6nzaid510jaikkawvpmv4kjphzz84p0hppq6vcp5jy00s2";
|
||||
};
|
||||
|
||||
depsSha256 = "13hy835871zxdnakwsr4bjm4krahlz4aqk5lh0rw78avfla89q9q";
|
||||
cargoSha256 = "0pdzh2xr40dgwravh3i58g602bpszj6c8inggzgmq2kfk8ck6rgj";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A fast CSV toolkit written in Rust";
|
||||
|
||||
@@ -14,7 +14,7 @@ buildRustPackage rec {
|
||||
sha256 = "0k5vkn112bjwh4wnxryzqz79dlja64k7s105mf3yaik136hqnmqv";
|
||||
};
|
||||
|
||||
depsSha256 = "1vxvkh1v9x6j4ggbh6sysi5i3089hrs0mjbp910a1jljiav7l8nj";
|
||||
cargoSha256 = "03bqhgz8c4ipdkd3g448bcrr6d188h87vskcfcc3mqlcxg77b8q5";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user