From 42bcd2a9a219e716e81b6b4cf32cb6948873e320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Fri, 5 Dec 2025 12:01:52 +0100 Subject: [PATCH] frobar: Set pyproject = true Requirement for 25.11 Also quite a few simplifications I can just make? Neat. --- hm/desktop/frobar/default.nix | 63 ++++++++++++++++------------------- hm/desktop/frobar/setup.py | 2 +- 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/hm/desktop/frobar/default.nix b/hm/desktop/frobar/default.nix index ec61076..a0746a8 100644 --- a/hm/desktop/frobar/default.nix +++ b/hm/desktop/frobar/default.nix @@ -1,26 +1,37 @@ { - # nixpkgs ? , - # nixpkgs ? builtins.getFlake "github:GeoffreyFrogeye/nixpkgs/zelbar", - nixpkgs ? /nix/store/8g86qw3c2fr56bhhvqznrlic4jig9hb3-source, + zelbarnixpkgs ? builtins.getFlake "github:GeoffreyFrogeye/nixpkgs/zelbar", + 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, -# is called pyton-mpd2 on PyPi but mpd2 in nixpkgs. -pkgs.python3Packages.buildPythonPackage rec { +pkgs.python3Packages.buildPythonApplication rec { pname = "frobar"; version = "3.1"; - dependencies = with pkgs.python3Packages; [ - i3ipc - psutil - pulsectl-asyncio - pygobject3 - rich - ]; + dependencies = + (with pkgs.python3Packages; [ + i3ipc + psutil + pulsectl-asyncio + pygobject3 + rich + ]) + ++ (with pkgs; [ + wirelesstools + zelbar + ]); nativeBuildInputs = with pkgs; [ wrapGAppsHook4 @@ -31,26 +42,8 @@ pkgs.python3Packages.buildPythonPackage rec { playerctl ]; - preFixup = '' - makeWrapperArgs+=( - ''${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 - ]; + pyproject = true; + build-system = [ pkgs.python3Packages.setuptools ]; src = ./.; } diff --git a/hm/desktop/frobar/setup.py b/hm/desktop/frobar/setup.py index 7bd880a..1e6f192 100644 --- a/hm/desktop/frobar/setup.py +++ b/hm/desktop/frobar/setup.py @@ -7,7 +7,7 @@ setup( "i3ipc", "psutil", "pulsectl-asyncio", - "pygobject3", + "pygobject", "rich", ], entry_points={