Pull in improvements from nixpkgs PR.

This commit is contained in:
Tom Alexander
2025-09-06 19:03:20 -04:00
parent b1c85417e1
commit b179bee277
4 changed files with 67 additions and 105 deletions

View File

@@ -1,76 +1,48 @@
# unpackPhase
# patchPhase
# configurePhase
# buildPhase
# checkPhase
# installPhase
# fixupPhase
# installCheckPhase
# distPhase
{
stdenv,
pkgs,
sqlite,
makeWrapper,
lib,
python3,
systemd,
# setuptools,
# cython,
pkgs,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
cython,
pkg-config,
# python3Packages,
...
setuptools,
}:
let
version = "1.6.3";
in
python3.pkgs.buildPythonPackage {
buildPythonPackage {
pname = "cysystemd";
version = version;
inherit version;
pyproject = true;
# format = "pyproject";
src = fetchFromGitHub {
owner = "mosquito";
repo = "cysystemd";
tag = version;
hash = "sha256-xumrQgoKfFeKdRQUIYXXiXEcNd76i4wo/EIDm8BN7oU=";
};
disabled = pythonOlder "3.6";
build-system = [
python3.pkgs.setuptools
python3.pkgs.cython
setuptools
cython
];
buildInputs = [ systemd ];
nativeBuildInputs = with python3.pkgs; [
# setuptools
# setuptools-git-versioning
# setuptools-git
# pyudev
# pkgs.systemd
nativeBuildInputs = [
pkg-config
];
propagatedBuildInputs = with python3.pkgs; [
# pyudev
# pandas
# jinja2
# tabulate
# seaborn
# cysystemd
# jinja2
# matplotlib
# seaborn
];
src = pkgs.fetchgit {
url = "https://github.com/mosquito/cysystemd.git";
tag = version;
sha256 = "sha256-xumrQgoKfFeKdRQUIYXXiXEcNd76i4wo/EIDm8BN7oU=";
# leaveDotGit = true;
};
# postPatch = ''
# substituteInPlace pyproject.toml \
# --replace-fail ', "setuptools-git-versioning>=2.0,<3"' ""
# '';
buildInputs = [ pkgs.systemd ];
meta = with lib; {
pythonImportsCheck = [ "cysystemd" ];
meta = {
description = "systemd wrapper on Cython";
homepage = "https://github.com/mosquito/cysystemd";
license = licenses.asl20;
platforms = platforms.linux;
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
};
}