nixpkgs/pkgs/by-name/ir/irust/package.nix
2024-06-02 15:00:22 -03:00

57 lines
1.1 KiB
Nix

{
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";
};
}