dotfiles/config/nix/hm/frobar/default.nix
Geoffrey Frogeye 47a19d7f82
nix: frobar
Semi-proper Python packaging, and non-conflicting names, yahoo!
2023-11-19 20:51:05 +01:00

32 lines
754 B
Nix

{ pkgs ? import <nixpkgs> { config = { }; overlays = [ ]; } }:
# Tried using pyproject.nix but mpd2 dependency wouldn't resolve,
# is called pyton-mpd2 on PyPi but mpd2 in nixpkgs.
let
frobar = pkgs.python3Packages.buildPythonApplication {
pname = "frobar";
version = "2.0";
propagatedBuildInputs = with pkgs.python3Packages; [
coloredlogs
notmuch
i3ipc
mpd2
psutil
pulsectl
pyinotify
];
src = ./.;
};
frobar_launcher = pkgs.writeShellApplication
{
name = "frobar_launcher";
runtimeInputs = with pkgs; [ lemonbar-xft wirelesstools ];
text = ''
${pkgs.procps}/bin/pkill /bin/frobar || true
${frobar}/bin/frobar
'';
};
in
frobar_launcher