nixpkgs/pkgs/development/tools/misc/tockloader/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

43 lines
879 B
Nix

{ lib
, python3
, fetchPypi
}:
python3.pkgs.buildPythonApplication rec {
pname = "tockloader";
version = "1.9.0";
src = fetchPypi {
inherit pname version;
hash = "sha256-7W55jugVtamFUL8N3dD1LFLJP2UDQb74V6o96rd/tEg=";
};
propagatedBuildInputs = with python3.pkgs; [
argcomplete
colorama
crcmod
pycryptodome
pyserial
questionary
toml
tqdm
];
# Project has no test suite
checkPhase = ''
runHook preCheck
$out/bin/tockloader --version | grep -q ${version}
runHook postCheck
'';
meta = with lib; {
description = "Tool for programming Tock onto hardware boards";
mainProgram = "tockloader";
homepage = "https://github.com/tock/tockloader";
changelog = "https://github.com/tock/tockloader/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}