2021-09-22 15:38:15 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rust-script";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.21.0";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fornwall";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-5T5DivfT7/MkBJo5YgLAVnfct84nBhw/OXWQ/4TMm2A=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cargoSha256 = "sha256-mDH3R9gn64DXVoe3Vkl2Kwhr7OTOUWKBLW5Y+Uo4aXM=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|