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