Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 64 lines 1.2 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 pkg-config, 6 stdenv, 7 curl, 8 openssl, 9 libgit2, 10}: 11 12rustPlatform.buildRustPackage rec { 13 pname = "cargo-dephell"; 14 version = "0.5.1"; 15 16 src = fetchFromGitHub { 17 owner = "mimoo"; 18 repo = "cargo-dephell"; 19 rev = "v${version}"; 20 hash = "sha256-NOjkKttA+mwPCpl4uiRIYD58DlMomVFpwnM9KGfWd+w="; 21 }; 22 23 cargoLock = { 24 lockFile = ./Cargo.lock; 25 }; 26 27 nativeBuildInputs = [ 28 pkg-config 29 ] 30 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 31 curl 32 ]; 33 34 buildInputs = [ 35 openssl 36 ] 37 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 38 curl 39 libgit2 40 ]; 41 42 # update Cargo.lock to work with openssl 3 43 postPatch = '' 44 ln -sf ${./Cargo.lock} Cargo.lock 45 ''; 46 47 env = { 48 LIBGIT2_NO_VENDOR = 1; 49 }; 50 51 meta = with lib; { 52 description = "Tool to analyze the third-party dependencies imported by a rust crate or rust workspace"; 53 mainProgram = "cargo-dephell"; 54 homepage = "https://github.com/mimoo/cargo-dephell"; 55 license = with licenses; [ 56 mit # or 57 asl20 58 ]; 59 maintainers = with maintainers; [ 60 figsoda 61 matthiasbeyer 62 ]; 63 }; 64}