at 24.11-pre 69 lines 1.4 kB view raw
1{ lib 2, rustPlatform 3, fetchCrate 4, cmake 5, installShellFiles 6, pkg-config 7, ronn 8, stdenv 9, curl 10, libgit2 11, libssh2 12, openssl 13, zlib 14, darwin 15}: 16 17rustPlatform.buildRustPackage rec { 18 pname = "cargo-update"; 19 version = "13.4.0"; 20 21 src = fetchCrate { 22 inherit pname version; 23 sha256 = "sha256-/9igT1/3ck8Roy2poq1urf+cLblentOB7S9Hh6uqIEw="; 24 }; 25 26 cargoHash = "sha256-pdWVp9+CLnNO7+U0a8WXWHZ+EeGNYx9J7WWAI1MTDvc="; 27 28 nativeBuildInputs = [ 29 cmake 30 installShellFiles 31 pkg-config 32 ronn 33 ] ++ lib.optionals stdenv.isDarwin [ 34 curl 35 ]; 36 37 buildInputs = [ 38 libgit2 39 libssh2 40 openssl 41 zlib 42 ] ++ lib.optionals stdenv.isDarwin [ 43 curl 44 darwin.apple_sdk.frameworks.Security 45 ]; 46 47 postBuild = '' 48 # Man pages contain non-ASCII, so explicitly set encoding to UTF-8. 49 HOME=$TMPDIR \ 50 RUBYOPT="-E utf-8:utf-8" \ 51 ronn -r --organization="cargo-update developers" man/*.md 52 ''; 53 54 postInstall = '' 55 installManPage man/*.1 56 ''; 57 58 env = { 59 LIBGIT2_NO_VENDOR = 1; 60 }; 61 62 meta = with lib; { 63 description = "A cargo subcommand for checking and applying updates to installed executables"; 64 homepage = "https://github.com/nabijaczleweli/cargo-update"; 65 changelog = "https://github.com/nabijaczleweli/cargo-update/releases/tag/v${version}"; 66 license = licenses.mit; 67 maintainers = with maintainers; [ gerschtli Br1ght0ne johntitor matthiasbeyer ]; 68 }; 69}