about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust/cargo-c/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust/cargo-c/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-c/default.nix25
1 files changed, 18 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-c/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-c/default.nix
index 71394c098907..8b4780d7ea08 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-c/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-c/default.nix
@@ -1,11 +1,11 @@
 { rustPlatform, stdenv, lib, fetchFromGitHub, fetchurl
-, pkg-config, openssl
+, pkg-config, curl, openssl
 , CoreFoundation, libiconv, Security
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-c";
-  version = "0.8.1";
+  version = "0.9.2";
 
   src = stdenv.mkDerivation rec {
     name = "${pname}-source-${version}";
@@ -14,11 +14,11 @@ rustPlatform.buildRustPackage rec {
       owner = "lu-zero";
       repo = pname;
       rev = "v${version}";
-      sha256 = "0fd0xql5cbqgmir2z3ah91iasaq9133wmi5bnhiy3dv7drcqv4rc";
+      sha256 = "0hvlrhmbplx4cj4l5fynihgr9cdh0rkpwvipizk1gpp6p1ksr5hz";
     };
     cargoLock = fetchurl {
       url = "https://github.com/lu-zero/${pname}/releases/download/v${version}/Cargo.lock";
-      sha256 = "1xlh3h77rxhqyr1nkqyanb120lwdks6fklh202camqpmznd763g5";
+      sha256 = "0ckn31asz7013206j153ig96602dxvxm6skdz1plan0h05j5mgah";
     };
 
     installPhase = ''
@@ -28,12 +28,23 @@ rustPlatform.buildRustPackage rec {
     '';
   };
 
-  cargoSha256 = "0b952xkg0l31laqlhsv3cqdag7v15k9na6xr6q9y8xwy1fjh9gzv";
+  cargoSha256 = "0c0vn2pcy5px02mc0l4a3w7z9n8hc6br5w3ww6nrav5w6911jp52";
 
-  nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ openssl ]
+
+  nativeBuildInputs = [ pkg-config (lib.getDev curl) ];
+  buildInputs = [ openssl curl ]
   ++ lib.optionals stdenv.isDarwin [ CoreFoundation libiconv Security ];
 
+  # Ensure that we are avoiding build of the curl vendored in curl-sys
+  doInstallCheck = stdenv.hostPlatform.libc == "glibc";
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    ldd "$out/bin/cargo-cbuild" | grep libcurl.so
+
+    runHook postInstallCheck
+  '';
+
   meta = with lib; {
     description = "A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries";
     longDescription = ''