1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5}:
6
7rustPlatform.buildRustPackage rec {
8 pname = "rust-script";
9 version = "0.35.0";
10
11 src = fetchFromGitHub {
12 owner = "fornwall";
13 repo = "rust-script";
14 rev = version;
15 sha256 = "sha256-uKmQgrbsFIY0XwrO16Urz3L76Gm2SxHW/CpHeCIUinM=";
16 };
17
18 cargoHash = "sha256-eSj04d/ktabUm58C7PAtiPqdiVP9NB3uSFxILZxe6jA=";
19
20 # tests require network access
21 doCheck = false;
22
23 meta = {
24 description = "Run Rust files and expressions as scripts without any setup or compilation step";
25 mainProgram = "rust-script";
26 homepage = "https://rust-script.org";
27 changelog = "https://github.com/fornwall/rust-script/releases/tag/${version}";
28 license = with lib.licenses; [
29 mit # or
30 asl20
31 ];
32 maintainers = with lib.maintainers; [ figsoda ];
33 };
34}