Pull in improvements from nixpkgs PR.
This commit is contained in:
parent
b1c85417e1
commit
b179bee277
@ -1,76 +1,48 @@
|
|||||||
# unpackPhase
|
|
||||||
# patchPhase
|
|
||||||
# configurePhase
|
|
||||||
# buildPhase
|
|
||||||
# checkPhase
|
|
||||||
# installPhase
|
|
||||||
# fixupPhase
|
|
||||||
# installCheckPhase
|
|
||||||
# distPhase
|
|
||||||
{
|
{
|
||||||
stdenv,
|
|
||||||
pkgs,
|
|
||||||
sqlite,
|
|
||||||
makeWrapper,
|
|
||||||
lib,
|
lib,
|
||||||
python3,
|
pkgs,
|
||||||
systemd,
|
buildPythonPackage,
|
||||||
# setuptools,
|
fetchFromGitHub,
|
||||||
# cython,
|
pythonOlder,
|
||||||
|
cython,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
# python3Packages,
|
setuptools,
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.6.3";
|
version = "1.6.3";
|
||||||
in
|
in
|
||||||
python3.pkgs.buildPythonPackage {
|
buildPythonPackage {
|
||||||
pname = "cysystemd";
|
pname = "cysystemd";
|
||||||
version = version;
|
inherit version;
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
# format = "pyproject";
|
src = fetchFromGitHub {
|
||||||
|
owner = "mosquito";
|
||||||
|
repo = "cysystemd";
|
||||||
|
tag = version;
|
||||||
|
hash = "sha256-xumrQgoKfFeKdRQUIYXXiXEcNd76i4wo/EIDm8BN7oU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
build-system = [
|
build-system = [
|
||||||
python3.pkgs.setuptools
|
setuptools
|
||||||
python3.pkgs.cython
|
cython
|
||||||
];
|
];
|
||||||
buildInputs = [ systemd ];
|
|
||||||
nativeBuildInputs = with python3.pkgs; [
|
nativeBuildInputs = [
|
||||||
# setuptools
|
|
||||||
# setuptools-git-versioning
|
|
||||||
# setuptools-git
|
|
||||||
# pyudev
|
|
||||||
# pkgs.systemd
|
|
||||||
pkg-config
|
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 = ''
|
buildInputs = [ pkgs.systemd ];
|
||||||
# substituteInPlace pyproject.toml \
|
|
||||||
# --replace-fail ', "setuptools-git-versioning>=2.0,<3"' ""
|
|
||||||
# '';
|
|
||||||
|
|
||||||
meta = with lib; {
|
pythonImportsCheck = [ "cysystemd" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
description = "systemd wrapper on Cython";
|
description = "systemd wrapper on Cython";
|
||||||
homepage = "https://github.com/mosquito/cysystemd";
|
homepage = "https://github.com/mosquito/cysystemd";
|
||||||
license = licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
platforms = platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
amd_s2idle
|
amd-debug-tools
|
||||||
];
|
];
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(
|
(
|
||||||
@ -30,28 +30,16 @@
|
|||||||
innerPackage = (final.callPackage ./package.nix { });
|
innerPackage = (final.callPackage ./package.nix { });
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
amd_s2idle = innerPackage;
|
amd-debug-tools = innerPackage;
|
||||||
# amd_s2idle = final.buildEnv {
|
|
||||||
# name = innerPackage.name;
|
|
||||||
# paths = [
|
|
||||||
# innerPackage
|
|
||||||
# ];
|
|
||||||
# nativeBuildInputs = [ final.makeWrapper ];
|
|
||||||
# postBuild = ''
|
|
||||||
# wrapProgram $out/bin/amd_s2idle --prefix PATH : ${
|
|
||||||
# lib.makeBinPath [
|
|
||||||
# (final.python3.withPackages (python-pkgs: [
|
|
||||||
# python-pkgs.distro # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
|
|
||||||
# python-pkgs.pyudev # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
|
|
||||||
# python-pkgs.systemd # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
|
|
||||||
# python-pkgs.packaging # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
|
|
||||||
# ]))
|
|
||||||
# ]
|
|
||||||
# }
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
(final: prev: {
|
||||||
|
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||||
|
(python-final: python-prev: {
|
||||||
|
cysystemd = (python-final.callPackage ./cysystemd.nix { });
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,44 +1,28 @@
|
|||||||
# unpackPhase
|
|
||||||
# patchPhase
|
|
||||||
# configurePhase
|
|
||||||
# buildPhase
|
|
||||||
# checkPhase
|
|
||||||
# installPhase
|
|
||||||
# fixupPhase
|
|
||||||
# installCheckPhase
|
|
||||||
# distPhase
|
|
||||||
{
|
{
|
||||||
stdenv,
|
|
||||||
pkgs,
|
|
||||||
sqlite,
|
|
||||||
makeWrapper,
|
|
||||||
lib,
|
lib,
|
||||||
python3,
|
fetchgit,
|
||||||
callPackage,
|
python3Packages,
|
||||||
# python3Packages,
|
|
||||||
acpica-tools,
|
acpica-tools,
|
||||||
ethtool,
|
ethtool,
|
||||||
libdisplay-info,
|
libdisplay-info,
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.2.7";
|
version = "0.2.7";
|
||||||
in
|
in
|
||||||
python3.pkgs.buildPythonApplication {
|
python3Packages.buildPythonApplication {
|
||||||
pname = "amd-debug-tools";
|
pname = "amd-debug-tools";
|
||||||
version = version;
|
inherit version;
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
# name = "amd-debug-tools";
|
build-system = with python3Packages; [
|
||||||
# format = "pyproject";
|
|
||||||
nativeBuildInputs = with python3.pkgs; [
|
|
||||||
setuptools
|
setuptools
|
||||||
setuptools-git-versioning
|
setuptools-git-versioning
|
||||||
setuptools-git
|
setuptools-git
|
||||||
pyudev
|
pyudev
|
||||||
];
|
];
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
dependencies = with python3Packages; [
|
||||||
(callPackage ./cysystemd.nix { })
|
cysystemd
|
||||||
jinja2
|
jinja2
|
||||||
matplotlib
|
matplotlib
|
||||||
pandas
|
pandas
|
||||||
@ -49,22 +33,26 @@ python3.pkgs.buildPythonApplication {
|
|||||||
ethtool
|
ethtool
|
||||||
libdisplay-info
|
libdisplay-info
|
||||||
];
|
];
|
||||||
src = pkgs.fetchgit {
|
src = fetchgit {
|
||||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git";
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git";
|
||||||
tag = version;
|
tag = version;
|
||||||
sha256 = "sha256-6X9cUKN0BkkKcYGU+YJYCGT+l5iUZDN+D8Fqq/ns98Q=";
|
hash = "sha256-6X9cUKN0BkkKcYGU+YJYCGT+l5iUZDN+D8Fqq/ns98Q=";
|
||||||
leaveDotGit = true;
|
leaveDotGit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
disabled = python3Packages.pythonOlder "3.7";
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pyproject.toml \
|
substituteInPlace pyproject.toml \
|
||||||
--replace-fail ', "setuptools-git-versioning>=2.0,<3"' ""
|
--replace-fail ', "setuptools-git-versioning>=2.0,<3"' ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
pythonImportsCheck = [ "amd_debug" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
description = "Debug tools for AMD zen systems";
|
description = "Debug tools for AMD zen systems";
|
||||||
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git/";
|
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git/";
|
||||||
license = licenses.mit;
|
license = lib.licenses.mit;
|
||||||
platforms = platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,13 @@
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
# (final: prev: {
|
# (final: prev: {
|
||||||
|
# python = prev.python.override {
|
||||||
|
# packageOverrides = python-final: python-prev: {
|
||||||
|
# inherit (pkgs-unoptimized.pythonPackages) coverage;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# })
|
||||||
|
# (final: prev: {
|
||||||
# pythonPackagesOverlays = prev.pythonPackagesOverlays.extend (
|
# pythonPackagesOverlays = prev.pythonPackagesOverlays.extend (
|
||||||
# final': prev': {
|
# final': prev': {
|
||||||
# inherit (pkgs-unoptimized.pythonPackagesOverlays)
|
# inherit (pkgs-unoptimized.pythonPackagesOverlays)
|
||||||
@ -135,6 +142,13 @@
|
|||||||
# }
|
# }
|
||||||
# );
|
# );
|
||||||
# })
|
# })
|
||||||
|
# (final: prev: {
|
||||||
|
# pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||||
|
# (python-final: python-prev: {
|
||||||
|
# inherit (pkgs-unoptimized.pythonPackages) coverage;
|
||||||
|
# })
|
||||||
|
# ];
|
||||||
|
# })
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
inherit (pkgs-unoptimized)
|
inherit (pkgs-unoptimized)
|
||||||
gsl
|
gsl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user