Commit Graph

77 Commits

Author SHA1 Message Date
Emily
e6b2583ec2 Revert "vim: fix build on darwin"
The ld64 issue has been fixed.

This reverts commit ade4a26bc1.
2026-07-15 03:26:25 +01:00
sempiternal-aurora
ade4a26bc1 vim: fix build on darwin 2026-07-02 00:03:28 +10:00
Lily Ballard
e954eff55e macvim: add vim common hardeningDisable flags
The other vim derivations all use a common definition of
`hardeningDisable` which disables `fortify`. The vim source already sets
`-D_FORTIFY_SOURCE=1` so it's not fully disabled, though it's certainly
weaker than what we get if we don't disable it.

Disabling `fortify` like this fixes a crash that occurs as a consequence
of `strictflexarrays1` now being enabled by default. Arguably we should
just disable that instead of disabling `fortify` but this keeps us
consistent with the other vim derivations.
2026-04-16 01:49:59 -07:00
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
Lily Ballard
7076369fd7 macvim: 181 -> 182
Update macvim to r182. This also teaches the tag logic to be correct if
overridden for a prerelease version (e.g. 181.2).
2025-11-02 19:11:19 -08:00
Lily Ballard
aee839d791 macvim: switch to building with the nixpkgs SDK
This uses the nixpkgs SDK to build, which means we can get rid of a lot
of our build hacks. This does mean we're now assuming that Xcode is in
`/Applications/Xcode.app` instead of letting xcode-select find it,
though this is configurable.

Reenable python3 support since using the nixpkgs SDK fixes the
incompatibility there.

Switch lua/perl/python/ruby/tcl support away from dynamic since vim
isn't finding the right libraries anymore, for some reason.

Remove some of the other old stuff like bits of the patchfile that don't
seem to be needed anymore.
2025-10-29 02:31:34 -07:00
Lily Ballard
74b8b4cbe3 macvim: remove postPatch phase for Sparkle.framework
MacVim itself now has a script that deletes Sparkle.framework from the
build result, so we don't need to avoid copying it anymore.
2025-10-26 01:54:40 -07:00
Lily Ballard
9175b93e95 macvim: move Xcode 26 fix into a patch file
Also fix the hunk headers/contexts in the existing patch file to be
correct for the current version.
2025-10-26 01:54:40 -07:00
Lily Ballard
f20cb87b0a macvim: add lilyball as maintainer 2025-10-23 03:00:26 -07:00
Lily Ballard
5ece9f37b1 macvim: 179 -> 181
Updates macvim to r181, including bumping the Ruby version to 3.4 since
that's what MacVim r181 is built against.

There's still 3 CVEs in the `knownVulnerabilities` list that are newer
than this release, but this is the latest MacVim release available right
now.
2025-10-23 02:49:57 -07:00
Lily Ballard
c06af958dc macvim: disable python support by default
MacVim currently fails to link against nixpkgs python because Xcode's
clang doesn't understand the LLVM bitcode in the
`libpython${pythonVersion}.a` static library. I'm not sure what this
static library is for when `lib/libpython${pythonVersion}.dylib` exists,
but I don't know of a way to tell MacVim to ignore it. Linking against
python works if we rebuild python to skip the static library but that
doesn't seem like a proper solution, so until a permanent solution is
found, just disable python by default.

Also mark macvim as no longer broken.
2025-10-23 02:49:57 -07:00
Lily Ballard
f7c3c92c7a macvim: resign the binary on aarch64-darwin
We need to resign the binary after running `install_name_tool` or it
will have an invalid code signature.
2025-10-23 02:49:57 -07:00
Lily Ballard
3693c2dc20 macvim: ensure we can change install names
Pass `-headerpad_max_install_names` again. This is something we used to
do, and then the flag got removed at some point. For some reason we need
to provide it both to configure and to Xcode.
2025-10-23 02:49:57 -07:00
Lily Ballard
427a98e129 macvim: delete incorrect manpages
We don't provide `eview` so we need to get rid of that manpage, and
there's also a bad `man/man1/mvim.1` symlink that goes nowhere.
2025-10-23 02:42:42 -07:00
Lily Ballard
636104f2d9 macvim: work around Xcode 26.0 bug
Xcode 26.0 sets `*_DEPLOYMENT_TARGET` env vars for all platforms in
shell script build phases, which breaks invocations of clang from those
phases, as they target the wrong platform.
2025-10-23 02:42:42 -07:00
Emily
19815692fc macvim: unpin Ruby and Perl 2025-10-12 17:30:44 +01:00
Emily
863220cafc macvim: mark vulnerable 2025-10-12 17:30:44 +01:00
Emily
fe0b7fed11 macvim: mark broken 2025-10-12 17:30:44 +01:00
Emily
954bb3bb03 treewide: remove references to deprecated darwin.libobjc stub
This was done with booxter’s fantastic [nix-clean-apple_sdk] tool,
simply modified to look for `libobjc` rather than the existing list he
already used in <https://github.com/NixOS/nixpkgs/pull/398707>. Some
manual work was applied, including cleaning up a string interpolation
in the terrifying MacVim derivation, stray comments, empty lists,
function parameters, and `inherit`s, including all of the references in
`all-packages.nix`.

[nix-clean-apple_sdk]: https://github.com/booxter/nix-clean-apple_sdk
2025-04-21 20:41:03 +01:00
Silvan Mosberger
667d42c00d treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 57b193d8dd
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00
Emily
59da82bf02 macvim: drop darwin.libutil dependency 2024-11-07 00:39:35 +00:00
Randy Eckenrode
b268bb2440 macvim: fix build after Darwin SDK update
MacVim needs to use the system Xcode to build. Having `DEVELOPER_DIR`
set in the environment causes Xcode to try to use the nixpkgs SDK, which
doesn’t work. Unsetting it allows MacVim to build.
2024-10-13 18:45:39 -04:00
Marcus Ramberg
0724f3cc56 macvim: 178 -> 179, perl536 -> perl540 2024-09-07 19:09:51 +02:00
Peder Bergebakken Sundt
dfbc165dc7 treewide: remove nested let-in 2024-08-09 03:58:35 +02:00
Jörg Thalheim
5356420466 treewide: remove unused with statements from maintainer lists
$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \
  -e 's!with lib.maintainers; \[ *\];![ ];!' \
  -e 's!with maintainers; \[ *\];![ ];!'
2024-07-29 10:06:20 +08:00
Lily Ballard
15196e1730 treewide: remove lilyball 2024-07-02 15:32:33 -04:00
Lily Ballard
5c5dd69859 macvim: 8.2.3455 -> 178
MacVim now uses its own release number as its primary version, but this
is equivalent to 9.0.1897.
2024-06-26 17:39:23 -07:00
Randy Eckenrode
e7b5b44f9d darwin.libiconv: remove and add to darwin-aliases 2024-04-27 18:09:53 -04:00
Randy Eckenrode
a426aa3a3f Revert "darwin.libiconv: remove and add to darwin-aliases"
This reverts commit 521ea079b9.
2024-03-31 09:57:54 -04:00
Randy Eckenrode
521ea079b9 darwin.libiconv: remove and add to darwin-aliases 2024-03-27 17:34:51 -04:00
Anderson Torres
a9d73dea16 treewide: remove cstrahan from meta.maintainers - part 2
19 files modified with this removal
2023-10-04 22:20:58 -03:00
Nick Cao
1d2d6b4683 macvim: use python3 instead of python37 2023-01-16 19:53:02 +08:00
Theodore Ni
bbd7a1511c macvim: remove python2 option 2022-12-05 18:25:49 -08:00
Brian Leung
e5307bdda5 macvim: 8.2.1719 -> 8.2.3455 2022-02-12 19:40:05 -08:00
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Lily Ballard
93b0accc76 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.
2020-11-05 21:00:31 -05:00
Lily Ballard
9daf3b994b macvim: 8.2.539 -> 8.2.1719 2020-09-28 15:33:36 -07:00
Lily Ballard
d3b1d59d84 macvim: Properly link against Nix ncurses
Since we're not using the Nix compiler, our buildInputs aren't
automatically exposed to the compiler, which means it was actually
compiling against system libncurses instead of Nix libncurses.

Also remove the `-Wno-error` from the make flags (and the unnecessary
`PREFIX` definition) in favor of using a much more targeted error
suppression at the configure flags. This works around an issue where
implicit function definitions are considered an error and the configure
script was trying to compile a file tht invoked an ncurses function
without including the relevant header.
2020-09-28 15:12:07 -07:00
Lily Ballard
ee28064389 macvim: Clean up hybrid compilation environment
MacVim compiles the Vim part using `/usr/bin/clang` and the GUI part
using Xcode. The Xcode portion always uses Xcode's own SDK and we have
no workable alternative. The Vim portion so far has been compiling using
a hybrid compilation environment, where it uses the SDK for most stuff
but picks up a bunch of library linker paths (including libSystem) by
virtue of Ruby's LDFLAGS. This hybrid compilation environment meant that
if the SDK headers referenced a symbol that the library itself didn't
have, this could produce link errors.

Previously we attempted to fix this by synthesizing an include path that
contained just the one header from Nix's Libsystem that referenced the
missing symbol, to get rid of the reference and allow linking to work
again, but this was very hacky and runs the risk of future Xcode SDK
changes producing the same errors with different headers, or of future
SDK versions expecting the intercepted header to contain a definition
that Nix's doesn't.

This new approach is to just clean up the compilation environment such
that the Vim portion is compiling against the Xcode SDK as well, by
sanitizing the LDFLAGS produced by the configure script so it stops
referencing Nix's versions of OS libraries. This means the resulting Vim
binary no longer depends at runtime on Nix for anything except the
scripting language support, but that's how it's been for the MacVim
binary all along anyway, and this approach should keep us insulated
against future Xcode SDK changes.
2020-04-28 13:54:33 -07:00
Lily Ballard
e4311a77b4 macvim: 8.2.319 -> 8.2.539 2020-04-15 11:16:24 -07:00
Lily Ballard
f3ccd5d6ba macvim: Fix compatibility with Xcode 11.4
Xcode 11.4 has an updated sys/_types/_fd_def.h header that references a
new symbol from libSystem. This is a problem because we're using
`/usr/bin/clang` to compile the non-Xcode portion, and this pulls in
headers from Xcode's SDK. Somehow it's still linking to the Nix
libraries (I can't figure out where configure finds these to put into
`LDFLAGS` as we're not using the cc-wrapper). The end result is we get a
linker error where this new symbol can't be found at link time, even
though it's a weak import and isn't required at runtime.

Ideally we'd provide a full 10.12 SDK to `/usr/bin/clang`, but we can't
do that because even the DevSDK package we use for our 10.12 SDK doesn't
contain everything (in particular it's missing nearly all dylibs) so we
just get linker errors if we do that.

Instead we'll just do a horrible hack and provide an `-isystem` path to
a folder structure that contains only the 10.12 `sys/_types/_fd_def.h`
header. This avoids the new symbol without causing all the errors that
happen if we pull in the entire `${darwin.Libsystem}/include`.
2020-04-15 11:16:24 -07:00
Michael Reilly
84cf00f980 treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Lily Ballard
7724875cae macvim: 8.1.2234 -> 8.2.319 2020-03-03 18:02:27 -08:00
Lily Ballard
505f913ceb macvim: Add -headerpad_max_install_names (#73592)
We were adding this to the compilation of MacVim, but not to the
compilation of the separate Vim binary. We may not actually need it for
MacVim at all, but omitting it for the Vim binary meant our postInstall
phase would fail for some people.

Fixes #73514
2019-11-17 20:16:47 -05:00
Lily Ballard
647ee3c2f0 macvim: snapshot-157 -> snapshot-161 2019-11-07 13:24:38 -08:00
worldofpeace
586208204e Merge pull request #69576 from lilyball/macvim-no-chroot
macvim: Add sandboxProfile
2019-10-09 20:41:29 +00:00
Lily Ballard
cf6fd91804 macvim: Add sandboxProfile
This allows full filesystem access except for Homebrew. This is because
we don't know where Xcode will be installed so we can't just whitelist
it and its dependencies.
2019-09-27 09:40:25 -07:00
Jörg Thalheim
05a92768f2 Merge pull request #68534 from lilyball/macvim-xcode-11-fix
macvim: fix compatibility with Xcode 11
2019-09-26 22:22:46 +01:00
Lily Ballard
4563496375 macvim: fix compatibility with Xcode 11
This fixes several Xcode 11 incompatibilities with MacVim, including an
issue where it wasn't inheriting the deployment target correctly to
begin with.
2019-09-11 20:13:36 -07:00