frobar: Set pyproject = true

Requirement for 25.11

Also quite a few simplifications I can just make? Neat.
This commit is contained in:
Geoffrey Frogeye 2025-12-05 12:01:52 +01:00
parent de6ddc085b
commit 42bcd2a9a2
2 changed files with 29 additions and 36 deletions

View file

@ -1,26 +1,37 @@
{ {
# nixpkgs ? <nixpkgs>, zelbarnixpkgs ? builtins.getFlake "github:GeoffreyFrogeye/nixpkgs/zelbar",
# nixpkgs ? builtins.getFlake "github:GeoffreyFrogeye/nixpkgs/zelbar", nixpkgs ? <nixpkgs>,
nixpkgs ? /nix/store/8g86qw3c2fr56bhhvqznrlic4jig9hb3-source,
pkgs ? import nixpkgs { pkgs ? import nixpkgs {
config = { }; overlays = [
overlays = [ ]; (
self: super:
let
zelbarpkgs = import zelbarnixpkgs { inherit (super) system; };
in
{
inherit (zelbarpkgs) zelbar;
}
)
];
}, },
... ...
}: }:
# Tried using pyproject.nix but mpd2 dependency wouldn't resolve, pkgs.python3Packages.buildPythonApplication rec {
# is called pyton-mpd2 on PyPi but mpd2 in nixpkgs.
pkgs.python3Packages.buildPythonPackage rec {
pname = "frobar"; pname = "frobar";
version = "3.1"; version = "3.1";
dependencies = with pkgs.python3Packages; [ dependencies =
(with pkgs.python3Packages; [
i3ipc i3ipc
psutil psutil
pulsectl-asyncio pulsectl-asyncio
pygobject3 pygobject3
rich rich
]; ])
++ (with pkgs; [
wirelesstools
zelbar
]);
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
wrapGAppsHook4 wrapGAppsHook4
@ -31,26 +42,8 @@ pkgs.python3Packages.buildPythonPackage rec {
playerctl playerctl
]; ];
preFixup = '' pyproject = true;
makeWrapperArgs+=( build-system = [ pkgs.python3Packages.setuptools ];
''${gappsWrapperArgs[@]}
--prefix PATH : ${
pkgs.lib.makeBinPath (
with pkgs;
[
wirelesstools
zelbar
]
)
}
--prefix LD_LIBRARY_PATH : ${LD_LIBRARY_PATH}
)
'';
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.glib.out
pkgs.playerctl
];
src = ./.; src = ./.;
} }

View file

@ -7,7 +7,7 @@ setup(
"i3ipc", "i3ipc",
"psutil", "psutil",
"pulsectl-asyncio", "pulsectl-asyncio",
"pygobject3", "pygobject",
"rich", "rich",
], ],
entry_points={ entry_points={