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:
parent
bd220c453d
commit
e2acb8f82a
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user