2021-09-22 15:38:15 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rust-script";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.25.0";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fornwall";
|
|
|
|
repo = pname;
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = version;
|
2023-04-12 12:48:02 +00:00
|
|
|
sha256 = "sha256-oY971/+3PizyOtKSXeyHUlC+Rf+qS+Zf5Ls+OL6rIgE=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
cargoSha256 = "sha256-NtYmJS9SBNZkF5hv5IcPzk6DxYLAu1/nBexahdjUYgY=";
|
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";
|
2023-04-12 12:48:02 +00:00
|
|
|
changelog = "https://github.com/fornwall/rust-script/releases/tag/${version}";
|
2021-09-22 15:38:15 +00:00
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|