summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLily Ballard <lily@sb.org>2020-11-05 18:00:31 -0800
committerGitHub <noreply@github.com>2020-11-05 21:00:31 -0500
commit93b0accc76ffccee15a1b34ff8206f84a64069cb (patch)
tree67b297a89b43f347e214db153895c37ac529013f
parent7c125d18fa3d377722940c0e484cdd6f72ca52eb (diff)
macvim: fix building with nix-daemon (#102975)
When building MacVim with nix-daemon it tries to place the derived data into a path rooted in `/var/empty`, which fails. Specifying the derived data path ourselves fixes this problem.
-rw-r--r--pkgs/applications/editors/vim/macvim.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix
index ef6c6a144071..d2cc14c30c48 100644
--- a/pkgs/applications/editors/vim/macvim.nix
+++ b/pkgs/applications/editors/vim/macvim.nix
@@ -94,6 +94,19 @@ stdenv.mkDerivation {
+ ''
unset LD
''
+ # When building with nix-daemon, we need to pass -derivedDataPath or else it tries to use
+ # a folder rooted in /var/empty and fails. Unfortunately we can't just pass -derivedDataPath
+ # by itself as this flag requires the use of -scheme or -xctestrun (not sure why), but MacVim
+ # by default just runs `xcodebuild -project src/MacVim/MacVim.xcodeproj`, relying on the default
+ # behavior to build the first target in the project. Experimentally, there seems to be a scheme
+ # called MacVim, so we'll explicitly select that. We also need to specify the configuration too
+ # as the scheme seems to have the wrong default.
+ + ''
+ configureFlagsArray+=(
+ XCODEFLAGS="-scheme MacVim -derivedDataPath $NIX_BUILD_TOP/derivedData"
+ --with-xcodecfg="Release"
+ )
+ ''
;
# Because we're building with system clang, this means we're building against Xcode's SDK and