diff --git a/pkgs/by-name/ir/irust/package.nix b/pkgs/by-name/ir/irust/package.nix new file mode 100644 index 000000000000..f2e4b2f5103c --- /dev/null +++ b/pkgs/by-name/ir/irust/package.nix @@ -0,0 +1,56 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + makeWrapper, + cargo, + rustfmt, + cargo-show-asm, + cargo-expand, + clang, + # Workaround to allow easily overriding runtime inputs + runtimeInputs ? [ + cargo + rustfmt + cargo-show-asm + cargo-expand + clang + ], + nix-update-script, +}: + +rustPlatform.buildRustPackage rec { + pname = "irust"; + version = "1.71.23"; + + src = fetchFromGitHub { + owner = "sigmaSd"; + repo = "IRust"; + rev = "irust@${version}"; + hash = "sha256-+kl22m2Is8CdLlqGSFOglw4/fM1exayaMH05YSuTsbw="; + }; + + cargoHash = "sha256-4aQ1IOTcUAkgiQucUG8cg9pVShtlu2IJeqNCGO+6VYY="; + + nativeBuildInputs = [ makeWrapper ]; + + postFixup = '' + wrapProgram $out/bin/irust \ + --suffix PATH : ${lib.makeBinPath runtimeInputs} + ''; + + checkFlags = [ + "--skip=repl" + "--skip=printer::tests" + ]; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + description = "Cross Platform Rust Repl"; + homepage = "https://github.com/sigmaSd/IRust"; + license = licenses.mit; + maintainers = with maintainers; [ lelgenio ]; + mainProgram = "irust"; + }; +}