nixpkgs/pkgs/development/python-modules/art/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

40 lines
867 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
}:
buildPythonPackage rec {
pname = "art";
version = "6.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "sepandhaghighi";
repo = "art";
rev = "v${version}";
hash = "sha256-RJexYOGWwAwxQ7lWGgXzFSR2aly1twB9pC4QFs5m7k8=";
};
pythonImportsCheck = [ "art" ];
# TypeError: art() missing 1 required positional argument: 'artname'
checkPhase = ''
runHook preCheck
$out/bin/art
$out/bin/art test
$out/bin/art test2
runHook postCheck
'';
meta = with lib; {
description = "ASCII art library for Python";
mainProgram = "art";
homepage = "https://github.com/sepandhaghighi/art";
changelog = "https://github.com/sepandhaghighi/art/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};
}