Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 makeWrapper,
6 cargo,
7 rustfmt,
8 cargo-show-asm,
9 cargo-expand,
10 clang,
11 # Workaround to allow easily overriding runtime inputs
12 runtimeInputs ? [
13 cargo
14 rustfmt
15 cargo-show-asm
16 cargo-expand
17 clang
18 ],
19 nix-update-script,
20}:
21
22rustPlatform.buildRustPackage rec {
23 pname = "irust";
24 version = "1.73.0";
25
26 src = fetchFromGitHub {
27 owner = "sigmaSd";
28 repo = "IRust";
29 rev = "irust@${version}";
30 hash = "sha256-oBHqyOqUNXO5c3TYFp84fDKA+R8ZmrgFCQswu7yXkGw=";
31 };
32
33 cargoHash = "sha256-YRptwZm00Px+3S+QFZAZxg25ObwmRdbgonzbMnBBb50=";
34
35 nativeBuildInputs = [ makeWrapper ];
36
37 postFixup = ''
38 wrapProgram $out/bin/irust \
39 --suffix PATH : ${lib.makeBinPath runtimeInputs}
40 '';
41
42 checkFlags = [
43 "--skip=repl"
44 "--skip=printer::tests"
45 ];
46
47 passthru.updateScript = nix-update-script { };
48
49 meta = with lib; {
50 description = "Cross Platform Rust Repl";
51 homepage = "https://github.com/sigmaSd/IRust";
52 license = licenses.mit;
53 maintainers = with maintainers; [ lelgenio ];
54 mainProgram = "irust";
55 };
56}