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

46 lines
987 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, setuptools
, setuptools-scm
}:
buildPythonPackage rec {
pname = "find-libpython";
version = "0.3.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ktbarrett";
repo = "find_libpython";
rev = "refs/tags/v${version}";
hash = "sha256-DBBAgfYQ4UBFn5Osb1kpVBWbrZVBAvcVGQ/J4rJO/rQ=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"find_libpython"
];
meta = with lib; {
description = "Finds the libpython associated with your environment, wherever it may be hiding";
mainProgram = "find_libpython";
changelog = "https://github.com/ktbarrett/find_libpython/releases/tag/v${version}";
homepage = "https://github.com/ktbarrett/find_libpython";
license = licenses.mit;
maintainers = with maintainers; [ jleightcap ];
};
}