Files
nixpkgs/pkgs/development/tools/rust/rust-script/default.nix
T
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

28 lines
798 B
Nix

{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "rust-script";
version = "0.34.0";
src = fetchFromGitHub {
owner = "fornwall";
repo = pname;
rev = version;
sha256 = "sha256-a9VWPN/mTz159xKgN2RNflrcuutWXVdEFzbTIZJKgdY=";
};
cargoHash = "sha256-dawNgQtF9zVhlwIZzP+c5fHzcLJbCLOZx3kgIRAktTk=";
# tests require network access
doCheck = false;
meta = with lib; {
description = "Run Rust files and expressions as scripts without any setup or compilation step";
mainProgram = "rust-script";
homepage = "https://rust-script.org";
changelog = "https://github.com/fornwall/rust-script/releases/tag/${version}";
license = with licenses; [ mit /* or */ asl20 ];
maintainers = with maintainers; [ figsoda ];
};
}