nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, rustPlatform, fetchFromGitHub }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "rust-script";
5 version = "0.20.0";
6
7 src = fetchFromGitHub {
8 owner = "fornwall";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-WcvRkp57VyBB5gQgamFoR6wK1cRJ+3hQqixOBgeapJU=";
12 };
13
14 cargoSha256 = "sha256-qJIftByppOrT4g3sxmKRSLhxtpAW4eXWX0FhmMDJNu0=";
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 license = with licenses; [ mit /* or */ asl20 ];
23 maintainers = with maintainers; [ figsoda ];
24 };
25}