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

45 lines
859 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, six
, future
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "textfsm";
version = "1.1.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "google";
repo = pname;
rev = "v${version}";
hash = "sha256-IHgKG8v0X+LSK6purWBdwDnI/BCs5XA12ZJixuqqXWg=";
};
# upstream forgot to update the release version
postPatch = ''
substituteInPlace textfsm/__init__.py \
--replace "1.1.2" "1.1.3"
'';
propagatedBuildInputs = [
six
future
];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Python module for parsing semi-structured text into python tables";
mainProgram = "textfsm";
homepage = "https://github.com/google/textfsm";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}