1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-11-14 23:42:43 +03:00

uninstaller: run on travis

This commit is contained in:
Daiderd Jordan 2018-01-15 01:14:57 +01:00
parent bd220c453d
commit e2acb8f82a
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
2 changed files with 8 additions and 3 deletions

View File

@ -7,9 +7,11 @@ matrix:
- nix-build ./release.nix -I darwin=. -A examples.simple
- nix-build ./release.nix -I darwin=. -A tests
- yes | nix-shell -A installer
- yes | nix-shell -A uninstaller
- os: osx
osx_image: xcode7.3 # 10.11
script:
- nix-build ./release.nix -I darwin=. -A examples.simple
- nix-build ./release.nix -I darwin=. -A tests
- yes | nix-shell -A installer
- yes | nix-shell -A uninstaller

View File

@ -21,9 +21,12 @@ with lib;
system.activationScripts.postActivation.text = mkAfter ''
if test -O /nix/store; then
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist || true
sudo cp /nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist
l=$(readlink /Library/LaunchDaemons/org.nixos.nix-daemon.plist) || true
if test "$l" != "/nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist"; then
sudo launchctl unload -w /Library/LaunchDaemons/org.nixos.nix-daemon.plist 2> /dev/null || true
sudo ln -sfn /nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo launchctl load -w /Library/LaunchDaemons/org.nixos.nix-daemon.plist
fi
if ! grep -q etc/profile.d/nix-daemon.sh /etc/bashrc; then
echo >&2 "Found no nix-daemon.sh reference in /etc/bashrc"