-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathapp.nix
More file actions
92 lines (84 loc) · 1.79 KB
/
app.nix
File metadata and controls
92 lines (84 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{ stdenv
, intltool
, gdk_pixbuf
, python3
, pkgconfig
, gtk3
, glib
, hicolor_icon_theme
, makeWrapper
, itstool
, gnome3
, autoconf
, pango
, atk
, sassc }:
let
py = python3;
# VERSION:
version = "0.2.2";
in
stdenv.mkDerivation rec {
name = "something-for-reddit-${version}";
src = ./.;
propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
nativeBuildInputs = [
pkgconfig
autoconf
gnome3.gnome-common
intltool
itstool
sassc
py.pkgs.pytest
py.pkgs.pytestcov
];
buildInputs = [
gtk3
glib
gdk_pixbuf
pango
py
hicolor_icon_theme
gnome3.gsettings_desktop_schemas
makeWrapper
gnome3.webkitgtk
gnome3.libsoup
] ++ (with py.pkgs; [
pygobject3
markdown
arrow
]);
preConfigure = ''
./autogen.sh
'';
extraLibs = [
gnome3.webkitgtk
gnome3.libsoup
gtk3
glib
pango
# full output for the gi typelib files:
pango.out
atk
gdk_pixbuf
];
extraTypelibPath = let
paths = map (lib: "${lib}/lib/girepository-1.0/") extraLibs;
in
builtins.concatStringsSep ":" paths;
extraLibPath = stdenv.lib.makeLibraryPath extraLibs;
preFixup = ''
wrapProgram "$out/bin/reddit-is-gtk" \
--prefix XDG_DATA_DIRS : "$out/share:${gnome3.gnome_themes_standard}/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--prefix GI_TYPELIB_PATH : "${extraTypelibPath}:$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH : "${extraLibPath}" \
--prefix PYTHONPATH : "$PYTHONPATH"
'';
meta = with stdenv.lib; {
homepage = https://github.com/samdroid-apps/something-for-reddit;
description = "A Reddit Client For GNOME (with Gtk+ and Python)";
maintainers = with maintainers; [ samdroid-apps ];
license = licenses.gpl3;
platforms = platforms.linux;
};
}