Skip to content

emacs: integrate macport into generic drv #155360

Merged
adisbladis merged 7 commits intoNixOS:masterfrom
Atemu:emacs-integrate-macport
Oct 17, 2022
Merged

emacs: integrate macport into generic drv #155360
adisbladis merged 7 commits intoNixOS:masterfrom
Atemu:emacs-integrate-macport

Conversation

@Atemu
Copy link
Member

@Atemu Atemu commented Jan 17, 2022

Motivation for this change
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.05 Release Notes (or backporting 21.11 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.

@github-actions github-actions bot added the 6.topic: emacs Text editor label Jan 17, 2022
@ofborg ofborg bot added the 8.has: clean-up This PR removes packages or removes other cruft label Jan 17, 2022
@ofborg ofborg bot requested review from adisbladis, jwiegley and lovek323 January 17, 2022 11:12
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jan 17, 2022
@Atemu Atemu force-pushed the emacs-integrate-macport branch from 8134570 to b30af5f Compare January 17, 2022 18:34
@Atemu Atemu marked this pull request as ready for review January 17, 2022 18:35
@Atemu
Copy link
Member Author

Atemu commented Jan 17, 2022

I have no idea why the release checks fail. The attribute evals just fine when building.

@Atemu Atemu requested a review from matthewbauer January 17, 2022 19:32
@Atemu Atemu force-pushed the emacs-integrate-macport branch from 0023706 to cc76c71 Compare January 17, 2022 21:42
@Atemu
Copy link
Member Author

Atemu commented Jan 18, 2022

Result of nixpkgs-review run on x86_64-darwin 1

1 package marked as broken and skipped:
  • cedille
5 packages failed to build:
  • agda
  • macvim
  • python310Packages.notmuch
  • python310Packages.pycflow2dot
  • vimacs
22 packages built:
  • aerc
  • afew
  • auctex
  • cask
  • cflow
  • cscope
  • emacs
  • emacs-nox
  • emacsMacport
  • framac
  • lieer
  • mozart2
  • mu
  • muchsync
  • neomutt
  • notmuch
  • notmuch-addrlookup
  • pycflow2dot (python39Packages.pycflow2dot)
  • pydb
  • python39Packages.notmuch
  • rtags
  • why3

The Agda build was killed manually because it takes so long. The other failures were already broken.

Result of nixpkgs-review run on x86_64-linux 1

1 package marked as broken and skipped:
  • cedille
2 packages failed to build:
  • alot
  • gcl_2_6_13_pre
31 packages built:
  • aerc
  • afew
  • agda
  • astroid
  • auctex
  • cask
  • cflow
  • cscope
  • emacs
  • emacs-nox
  • framac
  • gcl
  • i3status-rust
  • idutils
  • lieer
  • meli
  • mozart2
  • mozart2-binary
  • mu
  • muchsync
  • neomutt
  • notmuch
  • notmuch-addrlookup
  • pycflow2dot (python39Packages.pycflow2dot)
  • pydb
  • python310Packages.notmuch
  • python310Packages.pycflow2dot
  • python39Packages.notmuch
  • rtags
  • supercollider_scel
  • why3

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-in-distress/3604/49

@doronbehar
Copy link
Contributor

Quoting ofborg:

access to URI 'ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-27.2-mac-8.3.tar.gz' is forbidden in restricted mode

You should probably switch to an HTTP URL, preferably with a European or US domain.

There's also merge conflicts now.

@Atemu
Copy link
Member Author

Atemu commented Feb 1, 2022

I don't think the tarball is available through any other means.

We could build from source instead of the patches but I wanted to preserve the previous status-quo as much as possible.

Is that what causes the basic eval checks? Because the URL is unchanged, it was like this before too. The only thing I did change was go from fetchurl to fetchTarball since it's actually a tarball, not just a file.

@Atemu
Copy link
Member Author

Atemu commented Feb 13, 2022

Alright, I just tried using the exact same fetchurl string again but I still get eval errors. How the hell did it work before and why doesn't it work anymore?

The same ftp server is also used with fetchTarball inside the drv and the eval checks don't complain about that when I comment out the problematic patches fetcher.

What gives?

@Atemu
Copy link
Member Author

Atemu commented Feb 13, 2022

Should I just give up and build from source instead?

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/need-help-on-passing-eval-checks-with-ftp-in-fetchtarball/17673/1

@AndersonTorres
Copy link
Member

Should I just give up and build from source instead?

YES

@AndersonTorres
Copy link
Member

In my not so humble opinion, looking at the huge size of this patch, I think the macport should stay separated.
A whole source input, a set of patches, a set of MacOS-only libraries... All of It makes difficult to read and understand the expression.

@Atemu
Copy link
Member Author

Atemu commented Apr 15, 2022

huge size of this patch

It's not very big IMO. In fact, it removes more code than it adds.

A whole source input, a set of patches

It's one or the other.

a set of MacOS-only libraries

Many were already present for the upstream NS port of emacs which is different from the macport.

All of It makes difficult to read and understand the expression.

I disagree. It's trivial to ignore everything guarded behind things like withMacport and it isn't really all that much here. The emacs drv is simply a pretty complex thing all-together because emacs itself is a complex piece of software. Nothing wrong with that.


The problem with keeping the macport separated is that most of the drv is the same as regular emacs. The only difference would be that you wouldn't have to cater towards Linux toolkits in the macport drv and vice versa.

As macport is being developed with a 28.1 base now, integrating native-comp would mean maintaining even more duplicate code.

@AndersonTorres
Copy link
Member

Okay then.
Nonetheless your current code is conflicting the repo.

@Atemu
Copy link
Member Author

Atemu commented Apr 16, 2022

I'll get to that tomorrow hopefully.

@junyi-hou
Copy link

this is a great patch! it is sad that it hasn't been merged yet. Have you consider publishing it as an overlay?

@isker
Copy link
Contributor

isker commented Jul 28, 2022

it is sad that it hasn't been merged yet

It can’t be merged because it has merge conflicts. The conflicts need to be resolved.

@Atemu
Copy link
Member Author

Atemu commented Jul 28, 2022

It also can't be merged because there's an odd eval error that I need to get rid of first or rip out the tarball build.

If anyone wants to pick this up, feel free because I'm going to have exams for the next few weeks.

@AndersonTorres
Copy link
Member

Drafting.

@AndersonTorres AndersonTorres marked this pull request as draft July 30, 2022 01:51
@Atemu Atemu force-pushed the emacs-integrate-macport branch from cc76c71 to bdcf263 Compare October 15, 2022 17:10
@Atemu
Copy link
Member Author

Atemu commented Oct 15, 2022

Rebased and now building from source. I'll squash some of these together but the end-result will be the same.

@Atemu Atemu marked this pull request as ready for review October 15, 2022 17:13
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Oct 15, 2022
@Atemu Atemu force-pushed the emacs-integrate-macport branch from bdcf263 to 5dd7a6e Compare October 15, 2022 17:32
@Atemu
Copy link
Member Author

Atemu commented Oct 15, 2022

The high number of rebuilds are the emacsPackages, no need for staging.

@adisbladis adisbladis merged commit 7b0295a into NixOS:master Oct 17, 2022
@dhess
Copy link
Contributor

dhess commented Oct 17, 2022

Thank you all!

@Atemu Atemu deleted the emacs-integrate-macport branch October 17, 2022 13:04
@isker isker mentioned this pull request Oct 19, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: emacs Text editor 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants