forked from Misterio77/compiz-nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
143 lines (130 loc) · 2.73 KB
/
default.nix
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
stdenv,
fetchurl,
fetchFromGitLab,
lib,
autoconf,
automake,
libtool,
cmake,
pkg-config,
makeWrapper,
boost,
cairo,
fuse,
glibmm,
gnome,
intltool,
libnotify,
libstartup_notification,
libwnck3,
libxml2,
libxslt,
mesa_glu,
pcre2,
protobuf,
python3,
python3Packages,
xorg,
xorgserver,
wrapGAppsHook,
...
}:
stdenv.mkDerivation (f: {
pname = "compiz-reloaded";
version = "0.8.18git.20240206T150536~fe274c9f";
# shortVersion = "${lib.versions.majorMinor f.version}.${lib.versions.patch f.version}";
srcs = [
(fetchFromGitLab {
owner = "compiz";
repo = "compiz-core";
rev = "fe274c9f3d8d657dffaaa594be4c851e40ad623c";
hash = "sha256-XSyh7c03TnkZJ+Ij8WHyBWrgCCH4pcgt5hRswqi52kQ=";
name = "compiz-core";
})
(fetchFromGitLab {
owner = "compiz";
repo = "ccsm";
rev = "0cc706c1c741a8234da3bd1a2c0460cae2804820";
hash = "sha256-zY9Dz5Sd+NuZk5SrGgHrl71IEnVHgbjmypsoXrMv0p8=";
name = "ccsm";
})
];
sourceRoot = ".";
nativeBuildInputs = [
autoconf
automake
libtool
pkg-config
makeWrapper
xorg.libXdmcp.dev
pcre2.dev
libxml2.dev
wrapGAppsHook
python3Packages.wrapPython
];
buildInputs = [
boost
cairo
fuse
glibmm
# metacity
intltool
libnotify
libstartup_notification
libwnck3
libxml2
libxslt
mesa_glu
pcre2
pcre2.dev
protobuf
python3
python3Packages.cython
python3Packages.pycairo
python3Packages.pygobject3
python3Packages.setuptools
xorg.libXcursor
xorg.libXdmcp
xorg.libXdmcp.dev
xorgserver
];
dontWrapGApps = true;
pythonPath = with python3Packages; [
pycairo
pygobject3
];
buildPhase = ''
cd ./compiz-core
NOCONFIGURE=1 ./autogen.sh --prefix=$out
./configure \
--with-gtk=3.0 \
--host=x86_64-unknown-linux-gnu \
--prefix=$out \
--with-default-plugins=core,ccp,decoration,dbus,commands,ezoom,fade,minimize,mousepoll,move,place,png,regex,resize,session,snap,switcher,vpswitch,wall,workarounds
PREFIX=$out make
cd ..
'';
installPhase = ''
cd ./compiz-core
PREFIX=$out make install
cd ../ccsm
python setup.py install --prefix=$out
'';
postFixup = ''
wrapProgram "$out/bin/compiz" \
--prefix COMPIZ_BIN_PATH : "$out/bin/" \
--prefix LD_LIBRARY_PATH : "$out/lib"
wrapProgram "$out/bin/compiz-decorator" \
--prefix COMPIZ_BIN_PATH : "$out/bin/"
# Wrap CCSM with GApps and Python path
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
wrapPythonPrograms
wrapProgram $out/bin/ccsm \
--prefix PATH : ${lib.makeBinPath [
(python3.withPackages(pp: [pp.pygobject3]))
]}
'';
patches = [
];
})