Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 stdenv,
7 openssl,
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "chit";
12 version = "0.1.15";
13
14 src = fetchFromGitHub {
15 owner = "peterheesterman";
16 repo = "chit";
17 rev = version;
18 sha256 = "0iixczy3cad44j2d7zzj8f3lnmp4jwnb0snmwfgiq3vj9wrn28pz";
19 };
20
21 cargoLock = {
22 lockFile = ./Cargo.lock;
23 };
24
25 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
26
27 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
28 openssl
29 ];
30
31 # update Carg.lock to work with openssl 3
32 postPatch = ''
33 ln -sf ${./Cargo.lock} Cargo.lock
34 '';
35
36 meta = with lib; {
37 description = "Crate help in terminal: A tool for looking up details about rust crates without going to crates.io";
38 mainProgram = "chit";
39 longDescription = ''
40 Chit helps answer these questions:
41
42 * Who wrote this crate? What else did they write?
43 * What alternatives are there?
44 * How old is this crate?
45 * What versions are there? When did they come out?
46 * What are the downloads over time?
47 * Should i use this crate?
48 * How mature is it?
49 '';
50 homepage = "https://github.com/peterheesterman/chit";
51 license = licenses.mit;
52 maintainers = with maintainers; [ figsoda ];
53 };
54}