2021-09-22 15:38:15 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rust-script";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "0.19.0";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fornwall";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-CYeTt6PzVGu62/GJB+gUlOXG2bs4RV0LWECF4CN3Uic=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
cargoSha256 = "sha256-IUzaVeOTBAOo/jkDytk6qc7VatKX75l1yZy99iSIqyE=";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# tests require network access
|
2021-09-22 15:38:15 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Run Rust files and expressions as scripts without any setup or compilation step";
|
|
|
|
homepage = "https://rust-script.org";
|
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|