Merge pull request #311342 from pluiedev/zhf-24.05/cargo-raze

cargo-raze: 0.16.0 -> 0.16.1, unbreak, modernize

authored by Weijia Wang and committed by GitHub e38231dd fc96e711

+84 -51
+55
pkgs/by-name/ca/cargo-raze/package.nix
···
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + rustPlatform, 6 + pkg-config, 7 + curl, 8 + libgit2, 9 + openssl, 10 + darwin, 11 + }: 12 + let 13 + version = "0.16.1"; 14 + src = fetchFromGitHub { 15 + owner = "google"; 16 + repo = "cargo-raze"; 17 + rev = "v${version}"; 18 + hash = "sha256-dn1MrF+FYBG+vD5AfXCwmzskmKK/TXArnMWW2BAfFFQ="; 19 + }; 20 + in 21 + rustPlatform.buildRustPackage { 22 + pname = "cargo-raze"; 23 + inherit src version; 24 + 25 + sourceRoot = "${src.name}/impl"; 26 + 27 + # Make it build on Rust >1.76. Since upstream is unmaintained, 28 + # there's no counting on them to fix this any time soon... 29 + # See #310673 and #310125 for similar fixes 30 + cargoPatches = [ ./rustc-serialize-fix.patch ]; 31 + 32 + cargoHash = "sha256-V8FkkWcXrYcDmhbdJztpbd4gBVbtbPY0NHS4pb/z8HM="; 33 + 34 + nativeBuildInputs = [ pkg-config ]; 35 + buildInputs = [ 36 + libgit2 37 + openssl 38 + curl 39 + ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; 40 + 41 + preCheck = lib.optionalString stdenv.isDarwin '' 42 + # Darwin issue: Os { code: 24, kind: Uncategorized, message: "Too many open files" } 43 + # https://github.com/google/cargo-raze/issues/544 44 + ulimit -n 1024 45 + ''; 46 + 47 + __darwinAllowLocalNetworking = true; 48 + 49 + meta = { 50 + description = "Generate Bazel BUILD files from Cargo dependencies"; 51 + homepage = "https://github.com/google/cargo-raze"; 52 + license = lib.licenses.asl20; 53 + maintainers = with lib.maintainers; [ elasticdog ]; 54 + }; 55 + }
+29
pkgs/by-name/ca/cargo-raze/rustc-serialize-fix.patch
···
··· 1 + diff --git a/impl/Cargo.lock b/impl/Cargo.lock 2 + index 0c963206..7db3432f 100644 3 + --- a/Cargo.lock 4 + +++ b/Cargo.lock 5 + @@ -1957,9 +1957,9 @@ dependencies = [ 6 + 7 + [[package]] 8 + name = "rustc-serialize" 9 + -version = "0.3.24" 10 + +version = "0.3.25" 11 + source = "registry+https://github.com/rust-lang/crates.io-index" 12 + -checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" 13 + +checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" 14 + 15 + [[package]] 16 + name = "ryu" 17 + diff --git a/impl/Cargo.toml b/impl/Cargo.toml 18 + index 9dd6dd99..a559febf 100644 19 + --- a/Cargo.toml 20 + +++ b/Cargo.toml 21 + @@ -38,7 +38,7 @@ itertools = "0.10.0" 22 + log = "0.4.13" 23 + pathdiff = "0.2.0" 24 + regex = "1.5.5" 25 + -rustc-serialize = "0.3.24" 26 + +rustc-serialize = "0.3.25" 27 + semver = { version = "1", features = ["serde"] } 28 + serde = "1.0.120" 29 + serde_derive = "1.0.120"
-48
pkgs/development/tools/rust/cargo-raze/default.nix
··· 1 - { lib 2 - , stdenv 3 - , fetchFromGitHub 4 - , rustPlatform 5 - , pkg-config 6 - , curl 7 - , libgit2 8 - , openssl 9 - , Security 10 - }: 11 - 12 - rustPlatform.buildRustPackage rec { 13 - pname = "cargo-raze"; 14 - version = "0.16.0"; 15 - 16 - src = fetchFromGitHub { 17 - owner = "google"; 18 - repo = pname; 19 - rev = "v${version}"; 20 - hash = "sha256-ip0WuBn1b7uN/pAhOl5tfmToK73ZSHK7rucdtufsbCQ="; 21 - }; 22 - sourceRoot = "${src.name}/impl"; 23 - 24 - cargoHash = "sha256-hNZgQwhm4UPqmANplZGxG0DYHa31tu06nmqYaCA7Vdg="; 25 - 26 - nativeBuildInputs = [ pkg-config ]; 27 - buildInputs = [ 28 - libgit2 29 - openssl 30 - curl 31 - ] 32 - ++ lib.optional stdenv.isDarwin Security; 33 - 34 - preCheck = lib.optionalString stdenv.isDarwin '' 35 - # Darwin issue: Os { code: 24, kind: Uncategorized, message: "Too many open files" } 36 - # https://github.com/google/cargo-raze/issues/544 37 - ulimit -n 1024 38 - ''; 39 - 40 - __darwinAllowLocalNetworking = true; 41 - 42 - meta = with lib; { 43 - description = "Generate Bazel BUILD files from Cargo dependencies"; 44 - homepage = "https://github.com/google/cargo-raze"; 45 - license = licenses.asl20; 46 - maintainers = with maintainers; [ elasticdog ]; 47 - }; 48 - }
···
-3
pkgs/top-level/all-packages.nix
··· 16731 16732 cargo-nextest = callPackage ../development/tools/rust/cargo-nextest { }; 16733 cargo-play = callPackage ../development/tools/rust/cargo-play { }; 16734 - cargo-raze = callPackage ../development/tools/rust/cargo-raze { 16735 - inherit (darwin.apple_sdk.frameworks) Security; 16736 - }; 16737 cargo-rdme = callPackage ../by-name/ca/cargo-rdme/package.nix { 16738 inherit (darwin.apple_sdk.frameworks) Security; 16739 };
··· 16731 16732 cargo-nextest = callPackage ../development/tools/rust/cargo-nextest { }; 16733 cargo-play = callPackage ../development/tools/rust/cargo-play { }; 16734 cargo-rdme = callPackage ../by-name/ca/cargo-rdme/package.nix { 16735 inherit (darwin.apple_sdk.frameworks) Security; 16736 };