Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vimPlugins: make usage of luaPackages less confusing #190824

Closed
wants to merge 360 commits into from

Conversation

teto
Copy link
Member

@teto teto commented Sep 11, 2022

Description of changes

Fixes #185397

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@@ -26,7 +26,7 @@ in
lua_modules_path = "lua"
'';
});
finalDrv = toVimPlugin (luaDrv.overrideAttrs(oa: {
finalDrv = toVimPlugin (luaDrv.overrideAttrs(oa: (builtins.removeAttrs attrs ["version"]) // {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing the version number is also confusing because the derivation name will use a version different than the src's but keeping it breaks luarocks builder. I need to address that.

@teto teto marked this pull request as draft September 12, 2022 09:34
@teto teto mentioned this pull request Sep 18, 2022
SuperSandro2000 and others added 16 commits October 3, 2022 20:09
We run pytest with `--forked` in nixpkgs, to reduce side effects that
can occur when multiple tests mutate their environment in incompatible
ways.

Forking on macOS 10.13 and later is unsafe when an application does work
between calls to fork() and its followup exec(). This may lead to
crashes when calls into the Objective-C runtime are issued, which will
in turn coredump the Python interpreter.

One good reproducer for this scenario is when the urllib module tries
to lookup proxy configurations in `urllib.request.getproxies()` through
`get_proxies_macos_sysconf` into the native `_scproxy` module.

This is a class of issues that is of course not limited to the urllib
module. The general recommendation is to use `spawn` instead of `fork`,
but we don't have any influence on upstream developers to do one or the
other.

One often cited workaround would be to disable fork safety entirely on
calls to `initialize()`, which is probably a better solution than
running without multithreading (slow) or without the `--forked` (prone
to side effects) mode.

This currently happens on aarch64-linux only, where we use more recent
11.0 SDK version, while x86_64-darwin has been stuck on 10.12 for a
while now.

python/cpython#77906 (comment)
http://www.sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html

Closes: NixOS#194290
Typically the actual wheel will be unchanged, but it is possible we use
the relax deps hook modifying the wheel.
…irection

Validated as no change in `out`, `man`, `doc` outputs with diffoscope on
`ghostscript` expression.
flac: build with cmake, fixes cross compilation
zowoq and others added 3 commits October 5, 2022 07:19
…er indirection

Validated as no change in `out` and `dev` outputs with diffoscope on
`gnome2.libgnomeui` expression.
@teto teto force-pushed the vimPlugins-lua-update branch 3 times, most recently from acc4262 to ae94b3f Compare October 12, 2022 21:45
right now the src is ignored in:

```
  lush-nvim = buildNeovimPlugin {
    pname = "lush.nvim";
    version = "2022-08-09";
    src = fetchFromGitHub {
      owner = "rktjmp";
      repo = "lush.nvim";
      rev = "6b9f399245de7bea8dac2c3bf91096ffdedfcbb7";
      sha256 = "0rb77rwmbm438bmbjfk5hwrrcn5sihsa1413bdpc27rw3rrn8v8z";
    };
    meta.homepage = "https://github.com/rktjmp/lush.nvim/";
  };
```

which is very confusing. With this PR, we correctly override the src and
the version of the package. We introduce a rockspecVersion attribute of
lua package to be able to still find the rockspec when the
"version" field needs to be different than "rockspecVersion".
@teto teto closed this Oct 12, 2022
@github-actions github-actions bot added 6.topic: golang 6.topic: haskell 6.topic: kernel The Linux kernel 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python 6.topic: ruby 6.topic: stdenv Standard environment 6.topic: systemd 8.has: changelog 8.has: documentation 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 12, 2022
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

neovim plugin infrastructure