2021-09-22 15:38:15 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rust-script";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.20.0";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fornwall";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-WcvRkp57VyBB5gQgamFoR6wK1cRJ+3hQqixOBgeapJU=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
cargoSha256 = "sha256-qJIftByppOrT4g3sxmKRSLhxtpAW4eXWX0FhmMDJNu0=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|