diff options
author | José Romildo Malaquias <malaquias@gmail.com> | 2019-04-19 10:42:17 -0300 |
---|---|---|
committer | José Romildo Malaquias <malaquias@gmail.com> | 2019-05-05 17:14:42 -0300 |
commit | 9e9b96f07343ceb3f012fb07b6d73e0916ca0a87 (patch) | |
tree | ad37b6ccac548ea130213088c36eda7ced894767 /pkgs/desktops/deepin/dde-api | |
parent | 9a1890cafbaccee378ce1be73c3be386ff4b75d0 (diff) | |
download | nixlib-9e9b96f07343ceb3f012fb07b6d73e0916ca0a87.tar nixlib-9e9b96f07343ceb3f012fb07b6d73e0916ca0a87.tar.gz nixlib-9e9b96f07343ceb3f012fb07b6d73e0916ca0a87.tar.bz2 nixlib-9e9b96f07343ceb3f012fb07b6d73e0916ca0a87.tar.lz nixlib-9e9b96f07343ceb3f012fb07b6d73e0916ca0a87.tar.xz nixlib-9e9b96f07343ceb3f012fb07b6d73e0916ca0a87.tar.zst nixlib-9e9b96f07343ceb3f012fb07b6d73e0916ca0a87.zip |
nixos/deepin: install polkit local authority files in /etc
Diffstat (limited to 'pkgs/desktops/deepin/dde-api')
-rw-r--r-- | pkgs/desktops/deepin/dde-api/default.nix | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/pkgs/desktops/deepin/dde-api/default.nix b/pkgs/desktops/deepin/dde-api/default.nix index b0e908c847e1..76c0861cb3a7 100644 --- a/pkgs/desktops/deepin/dde-api/default.nix +++ b/pkgs/desktops/deepin/dde-api/default.nix @@ -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; { |