1{
2 lib,
3 stdenv,
4 rustPlatform,
5 fetchCrate,
6 pkg-config,
7 openssl,
8}:
9rustPlatform.buildRustPackage rec {
10 pname = "rustfinity";
11 version = "0.2.14";
12
13 src = fetchCrate {
14 inherit pname version;
15 hash = "sha256-Oh+AEgmBhlOQaCFECheuHCXT6hndpUnZH/l+tWMp2RQ=";
16 };
17
18 cargoHash = "sha256-e1RnPqfgeyeEh8Av81RTuaMgYc6zoBZcygbc29DNKqE=";
19
20 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
21 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
22
23 OPENSSL_NO_VENDOR = 1;
24
25 # Requires network and fs access
26 checkFlags = [
27 "--skip=challenge::tests::test_challenge_exists"
28 "--skip=crates_io::tests::test_get_latest_version"
29 "--skip=dir::tests::test_get_current_dir"
30 "--skip=download::tests::download_file::test_downloads_file"
31 "--skip=download::tests::download_file::test_renames_starter"
32 ];
33
34 meta = {
35 description = "CLI for Rustfinity challenges solving";
36 homepage = "https://github.com/dcodesdev/rustfinity.com/tree/main/crates/cli";
37 license = lib.licenses.mit;
38 maintainers = with lib.maintainers; [ nartsiss ];
39 mainProgram = "rustfinity";
40 };
41}