Merge pull request #138832 from figsoda/rust-script

This commit is contained in:
Sandro 2021-09-21 22:00:28 +02:00 committed by GitHub
commit 46c29e25e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,26 @@
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "rust-script";
version = "0.17.0";
src = fetchFromGitHub {
owner = "fornwall";
repo = pname;
rev = "v${version}";
sha256 = "0jz8hlvl31c5h8whd6pnpmslw6w6alkxijd9lhgric1yypiym9x3";
};
cargoSha256 = "sha256-hg0QtxR1qm/x8G6HoN7xAyOwh9jiQvX2wWYjUR8YvMs=";
# TODO: switch to `cargoCheckType = "false"` after #138822 is merged
# tests only work in debug mode
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 ];
};
}

View File

@ -12519,6 +12519,7 @@ with pkgs;
rust-cbindgen = callPackage ../development/tools/rust/cbindgen {
inherit (darwin.apple_sdk.frameworks) Security;
};
rust-script = callPackage ../development/tools/rust/rust-script { };
rustup = callPackage ../development/tools/rust/rustup {
inherit (darwin.apple_sdk.frameworks) CoreServices Security;
};