nixpkgs/pkgs/development/tools/misc/scriptisto/default.nix
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

37 lines
898 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "scriptisto";
version = "2.1.1";
src = fetchFromGitHub {
owner = "igor-petruk";
repo = "scriptisto";
rev = "v${version}";
hash = "sha256-WQSgN1iX26tPPaJXLtU5Eo8kFahT6g+gZKJEDT6zj1E=";
};
cargoHash = "sha256-trDf6N7PMjxlum8Rx2TxGePM6UPzMlTU6ATyGzmFoNc=";
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
installManPage man/*
'';
meta = with lib; {
description = "A language-agnostic \"shebang interpreter\" that enables you to write scripts in compiled languages";
mainProgram = "scriptisto";
homepage = "https://github.com/igor-petruk/scriptisto";
changelog = "https://github.com/igor-petruk/scriptisto/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
};
}