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

34 lines
710 B
Nix

{ lib, python3, fetchPypi }:
python3.pkgs.buildPythonApplication rec {
pname = "distgen";
version = "1.17";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Md6R1thUtPQ7BFZsWmTDuNdD7UHMMFlEVksIJZAyjk4=";
};
nativeCheckInputs = with python3.pkgs; [
pytest
mock
];
propagatedBuildInputs = with python3.pkgs; [
distro
jinja2
six
pyyaml
];
checkPhase = "make test-unit PYTHON=${python3.executable}";
meta = with lib; {
description = "Templating system/generator for distributions";
mainProgram = "dg";
license = licenses.gpl2Plus;
homepage = "https://distgen.readthedocs.io/";
maintainers = with maintainers; [ bachp ];
};
}