1{ lib, rustPlatform, fetchFromGitHub }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "rust-script";
5 version = "0.27.0";
6
7 src = fetchFromGitHub {
8 owner = "fornwall";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-noyef+G05749WqqqCH6qyVorCR4DRZTl38ftkU66IBQ=";
12 };
13
14 cargoSha256 = "sha256-L5uqckG+NbatpBTejZw/Xk+OGZqsJgzHRwCTh1FJHVw=";
15
16 # tests require network access
17 doCheck = false;
18
19 meta = with lib; {
20 description = "Run Rust files and expressions as scripts without any setup or compilation step";
21 homepage = "https://rust-script.org";
22 changelog = "https://github.com/fornwall/rust-script/releases/tag/${version}";
23 license = with licenses; [ mit /* or */ asl20 ];
24 maintainers = with maintainers; [ figsoda ];
25 };
26}