1414 git ,
1515 glib ,
1616 glib-networking ,
17+ gobject-introspection ,
1718 gnused ,
1819 gnutls ,
1920 hostname ,
@@ -160,15 +161,23 @@ stdenv.mkDerivation (finalAttrs: {
160161 --replace-warn '"/usr/share' '"/run/current-system/sw/share' \
161162 --replace-warn '"/lib/systemd' '"/run/current-system/sw/lib/systemd'
162163
163- # replace reference to system python interpreter, used for e.g. sosreport
164- substituteInPlace pkg/lib/python.ts \
165- --replace-fail /usr/libexec/platform-python ${ python3Packages . python . interpreter }
164+ # fix polkit agent helper path
165+ substituteInPlace src/cockpit/polkit.py \
166+ --replace-fail " /usr/lib/polkit-1/polkit-agent-helper-1" "/run/wrappers/bin/polkit-agent-helper-1"
166167 '' ;
167168
168169 configureFlags = [
169170 "--enable-prefix-only=yes"
170171 "--disable-pcp" # TODO: figure out how to package its dependency
171- "--with-default-session-path=${ placeholder "out" } /bin:/etc/cockpit/bin:${ util-linux } /bin:/run/wrappers/bin:/run/current-system/sw/bin"
172+ "--with-default-session-path=${
173+ lib . makeBinPath [
174+ ( placeholder "out" )
175+ "/etc/cockpit"
176+ util-linux
177+ "/run/wrappers"
178+ "/run/current-system/sw"
179+ ]
180+ } "
172181 "--with-admin-group=root" # TODO: really? Maybe "wheel"?
173182 ] ;
174183
@@ -192,8 +201,15 @@ stdenv.mkDerivation (finalAttrs: {
192201 for binary in $out/bin/cockpit-bridge $out/libexec/cockpit-askpass; do
193202 chmod +x $binary
194203 wrapProgram $binary \
195- --prefix PYTHONPATH : $out/${ python3Packages . python . sitePackages } \
196- --prefix XDG_DATA_DIRS : /etc/cockpit/share # Cockpit apps will be stored at /etc/cockpit/share/cockpit/ (managed by Cockpit nixos service)
204+ --prefix PATH : "/etc/cockpit/bin" \
205+ --prefix PYTHONPATH : ${
206+ lib . makeSearchPath python3Packages . python . sitePackages [
207+ "$out"
208+ "/etc/cockpit"
209+ ]
210+ } \
211+ --prefix GI_TYPELIB_PATH : "/etc/cockpit/lib/girepository-1.0" \
212+ --prefix XDG_DATA_DIRS : "/etc/cockpit/share"
197213 done
198214
199215 patchShebangs $out/share/cockpit/issue/update-issue
@@ -256,6 +272,12 @@ stdenv.mkDerivation (finalAttrs: {
256272 passthru = {
257273 tests = { inherit ( nixosTests ) cockpit ; } ;
258274 updateScript = nix-update-script { } ;
275+ cockpitPath = [
276+ glib
277+ gobject-introspection
278+ python3Packages . python
279+ python3Packages . pygobject3
280+ ] ;
259281 } ;
260282
261283 meta = {
@@ -264,9 +286,6 @@ stdenv.mkDerivation (finalAttrs: {
264286 homepage = "https://cockpit-project.org/" ;
265287 changelog = "https://cockpit-project.org/blog/cockpit-${ finalAttrs . version } .html" ;
266288 license = lib . licenses . lgpl21 ;
267- maintainers = with lib . maintainers ; [
268- lucasew
269- andre4ik3
270- ] ;
289+ teams = [ lib . teams . cockpit ] ;
271290 } ;
272291} )
0 commit comments