nixos/deepin: install polkit local authority files in /etc
This commit is contained in:
parent
9a1890cafb
commit
9e9b96f073
@ -69,6 +69,12 @@
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"polkit-1/localauthority/10-vendor.d/com.deepin.api.device.pkla".source = "${pkgs.deepin.dde-api}/etc/polkit-1/localauthority/10-vendor.d/com.deepin.api.device.pkla";
|
||||
"polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Accounts.pkla".source = "${pkgs.deepin.dde-daemon}/etc/polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Accounts.pkla";
|
||||
"polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Grub2.pkla".source = "${pkgs.deepin.dde-daemon}/etc/polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Grub2.pkla";
|
||||
};
|
||||
|
||||
services.deepin.deepin-menu.enable = true;
|
||||
services.deepin.deepin-turbo.enable = true;
|
||||
})
|
||||
|
@ -68,15 +68,10 @@ buildGoPackage rec {
|
||||
rfkill # run
|
||||
xcur2png # run
|
||||
#locales # run (locale-helper needs locale-gen, which is unavailable on NixOS?)
|
||||
];
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
searchHardCodedPaths # debugging
|
||||
|
||||
sed -i -e "s|/var|$out/var|" Makefile
|
||||
|
||||
# TODO: confirm where to install grub themes
|
||||
sed -i -e "s|/boot/grub|$out/boot/grub|" Makefile
|
||||
searchHardCodedPaths # debugging
|
||||
|
||||
fixPath $out /usr/lib/deepin-api \
|
||||
lunar-calendar/main.go \
|
||||
@ -90,6 +85,19 @@ buildGoPackage rec {
|
||||
misc/systemd/system/deepin-shutdown-sound.service \
|
||||
theme_thumb/gtk/gtk.go \
|
||||
thumbnails/gtk/gtk.go
|
||||
fixPath $out /boot/grub Makefile # TODO: confirm where to install grub themes
|
||||
fixPath $out /var Makefile
|
||||
|
||||
# This package wants to install polkit local authority files into
|
||||
# /var/lib. Nix does not allow a package to install files into /var/lib
|
||||
# because it is outside of the Nix store and should contain applications
|
||||
# state information (persistent data modified by programs as they
|
||||
# run). Polkit looks for them in both /etc/polkit-1 and
|
||||
# /var/lib/polkit-1 (with /etc having priority over /var/lib). An
|
||||
# work around is to install them to $out/etc and simlnk them to
|
||||
# /etc in the deepin module.
|
||||
|
||||
sed -i -e "s,/var/lib/polkit-1,/etc/polkit-1," Makefile
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
@ -103,6 +111,10 @@ buildGoPackage rec {
|
||||
remove-references-to -t ${go} $out/bin/* $out/lib/deepin-api/*
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
searchHardCodedPaths $out # debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { inherit name; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -66,7 +66,7 @@ buildGoPackage rec {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
searchHardCodedPaths
|
||||
searchHardCodedPaths # debugging
|
||||
patchShebangs network/nm_generator/gen_nm_consts.py
|
||||
|
||||
fixPath $out /usr/share/dde/data launcher/manager.go dock/dock_manager_init.go
|
||||
@ -78,12 +78,21 @@ buildGoPackage rec {
|
||||
fixPath ${deepin-wallpapers} /usr/share/wallpapers appearance/background/list.go accounts/user.go
|
||||
|
||||
sed -i -e "s|{DESTDIR}/etc|{DESTDIR}$out/etc|" Makefile
|
||||
sed -i -e "s|{DESTDIR}/var|{DESTDIR}$out/var|" Makefile
|
||||
sed -i -e "s|{DESTDIR}/lib|{DESTDIR}$out/lib|" Makefile
|
||||
sed -i -e "s|{DESTDIR}/var|{DESTDIR}$out/var|" Makefile
|
||||
|
||||
find -type f -exec sed -i -e "s,/usr/lib/deepin-daemon,$out/lib/deepin-daemon," {} +
|
||||
|
||||
searchHardCodedPaths
|
||||
# This package wants to install polkit local authority files into
|
||||
# /var/lib. Nix does not allow a package to install files into /var/lib
|
||||
# because it is outside of the Nix store and should contain applications
|
||||
# state information (persistent data modified by programs as they
|
||||
# run). Polkit looks for them in both /etc/polkit-1 and
|
||||
# /var/lib/polkit-1 (with /etc having priority over /var/lib). An
|
||||
# work around is to install them to $out/etc and simlnk them to
|
||||
# /etc in the deepin module.
|
||||
|
||||
sed -i -e "s,/var/lib/polkit-1,/etc/polkit-1," Makefile
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
@ -104,6 +113,8 @@ buildGoPackage rec {
|
||||
for binary in $out/lib/deepin-daemon/*; do
|
||||
wrapProgram $binary "''${gappsWrapperArgs[@]}"
|
||||
done
|
||||
|
||||
searchHardCodedPaths $out # debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { inherit name; };
|
||||
|
Loading…
Reference in New Issue
Block a user