2024-02-01 11:32:01 +00:00
# XXX: lemonade is ALPHA. literally unusable right now. it loads the top communities from lemmy.ml, but interacting with them in any form is completely unimplemented.
# my development fork: <https://git.uninsane.org/colin/lemonade>
# difference from tip:
# - flake.nix/default.nix
# - runs outside flatpak
# - more logging
{ lib , stdenv
, desktop-file-utils
, fetchFromGitHub
, gitUpdater
, gobject-introspection
, gtk4
, libadwaita
, meson
, ninja
, python3
, wrapGAppsHook4
} :
let
pyEnv = python3 . withPackages ( ps : with ps ; [
pygobject3
requests
] ) ;
in
stdenv . mkDerivation ( final : with final ; {
pname = " l e m o n a d e " ;
2024-03-22 17:27:20 +00:00
version = " 2 0 2 4 . 0 3 . 2 0 " ;
2024-02-01 11:32:01 +00:00
src = fetchFromGitHub {
owner = " m d w a l t e r s " ;
repo = " l e m o n a d e " ;
rev = version ;
2024-03-22 17:27:20 +00:00
hash = " s h a 2 5 6 - D 9 V 1 4 i c U R N c + U / G r P j I r C n V B r C w 9 v 4 G B m L t a M Q A B o l A = " ;
2024-02-01 11:32:01 +00:00
} ;
postPatch = ''
# see: <https://github.com/mdwalters/lemonade/issues/9>
substituteInPlace src/main.py \
2024-03-22 17:27:20 +00:00
- - replace-fail \
2024-02-01 11:32:01 +00:00
" { o s . e n v i r o n [ ' X D G _ R U N T I M E _ D I R ' ] } / a p p / m l . m d w a l t e r s . L e m o n a d e / c a c h e " \
" { o s . e n v i r o n [ ' H O M E ' ] } / . c a c h e / m l . m d w a l t e r s . L e m o n a d e " \
2024-03-22 17:27:20 +00:00
- - replace-fail \
2024-02-01 11:32:01 +00:00
' os . path . join ( f " { o s . e n v i r o n [ ' " ' " ' X D G _ R U N T I M E _ D I R ' " ' " ' ] } / a p p / m l . m d w a l t e r s . L e m o n a d e " , " c a c h e " ) ' \
' os . path . join ( f " { o s . e n v i r o n [ ' " ' " ' H O M E ' " ' " ' ] } / . c a c h e " , " m l . m d w a l t e r s . L e m o n a d e " ) '
'' ;
nativeBuildInputs = [
desktop-file-utils
gobject-introspection
meson
ninja
wrapGAppsHook4
] ;
buildInputs = [
gtk4
libadwaita
pyEnv
] ;
passthru . updateScript = gitUpdater { } ;
meta = with lib ; {
description = " 🍋 F o l l o w d i s c u s s i o n s o n L e m m y " ;
homepage = " h t t p s : / / g i t h u b . c o m / m d w a l t e r s / l e m o n a d e " ;
license = licenses . gpl3Plus ;
maintainers = with maintainers ; [ colinsane ] ;
} ;
} )