frobar: Better building method

This commit is contained in:
Geoffrey Frogeye 2025-05-29 22:49:23 +02:00
parent d645ace45c
commit 577129cb1c
2 changed files with 29 additions and 13 deletions

View file

@ -1,4 +1,5 @@
{
# nixpkgs ? <nixpkgs>,
# nixpkgs ? builtins.getFlake "github:GeoffreyFrogeye/nixpkgs/zelbar",
nixpkgs ? /nix/store/8g86qw3c2fr56bhhvqznrlic4jig9hb3-source,
pkgs ? import nixpkgs {
@ -9,29 +10,44 @@
}:
# Tried using pyproject.nix but mpd2 dependency wouldn't resolve,
# is called pyton-mpd2 on PyPi but mpd2 in nixpkgs.
pkgs.python3Packages.buildPythonApplication rec {
pkgs.python3Packages.buildPythonPackage rec {
pname = "frobar";
version = "3.0";
version = "3.1";
propagatedBuildInputs = with pkgs.python3Packages; [
dependencies = with pkgs.python3Packages; [
i3ipc
psutil
pulsectl-asyncio
pygobject3
rich
];
# TODO Might just be buildInputs, maybe without the need for prefix?
nativeBuildInputs = with pkgs; [
wirelesstools
playerctl
zelbar
];
makeWrapperArgs = [
"--prefix PATH : ${pkgs.lib.makeBinPath nativeBuildInputs}"
"--prefix GI_TYPELIB_PATH : ${GI_TYPELIB_PATH}"
wrapGAppsHook4
gobject-introspection
];
GI_TYPELIB_PATH = pkgs.lib.makeSearchPath "lib/girepository-1.0" [
buildInputs = with pkgs; [
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
];

View file

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name="frobar",
version="3.0",
version="3.1",
install_requires=[
"i3ipc",
"psutil",