Skip to content

Commit

Permalink
rust-script: init at 0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
figsoda committed Sep 21, 2021
1 parent bb7bb64 commit 8ef4b63
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pkgs/development/tools/rust/rust-script/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12508,6 +12508,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;
};
Expand Down

0 comments on commit 8ef4b63

Please sign in to comment.