-
-
Notifications
You must be signed in to change notification settings - Fork 24
nix: ship a site-start startup stub #61
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
Open
eval-exec
wants to merge
1
commit into
main
Choose a base branch
from
fix/issue-60-site-start-stub
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+15
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -266,12 +266,18 @@ in stdenv.mkDerivation { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Wrap the binary with required environment variables | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| postInstall = if isLinux then '' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| install -Dm644 ${./site-start.el} \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "$out/share/emacs/site-lisp/site-start.el" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wrapProgram $out/bin/emacs \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --set WPE_BACKEND_LIBRARY "${libwpe-fdo}/lib/libWPEBackend-fdo-1.0.so" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --set GIO_MODULE_DIR "${glib-networking}/lib/gio/modules" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --set WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS "1" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --prefix PATH : "${wpewebkit}/libexec/wpe-webkit-2.0" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '' else '' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| install -Dm644 ${./site-start.el} \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "$out/share/emacs/site-lisp/site-start.el" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wrapProgram $out/bin/emacs \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --set GIO_MODULE_DIR "${glib-networking}/lib/gio/modules" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
268
to
283
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| postInstall = if isLinux then '' | |
| install -Dm644 ${./site-start.el} \ | |
| "$out/share/emacs/site-lisp/site-start.el" | |
| wrapProgram $out/bin/emacs \ | |
| --set WPE_BACKEND_LIBRARY "${libwpe-fdo}/lib/libWPEBackend-fdo-1.0.so" \ | |
| --set GIO_MODULE_DIR "${glib-networking}/lib/gio/modules" \ | |
| --set WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS "1" \ | |
| --prefix PATH : "${wpewebkit}/libexec/wpe-webkit-2.0" | |
| '' else '' | |
| install -Dm644 ${./site-start.el} \ | |
| "$out/share/emacs/site-lisp/site-start.el" | |
| wrapProgram $out/bin/emacs \ | |
| --set GIO_MODULE_DIR "${glib-networking}/lib/gio/modules" | |
| ''; | |
| postInstall = '' | |
| install -Dm644 ${./site-start.el} \ | |
| "$out/share/emacs/site-lisp/site-start.el" | |
| '' + (if isLinux then '' | |
| wrapProgram $out/bin/emacs \ | |
| --set WPE_BACKEND_LIBRARY "${libwpe-fdo}/lib/libWPEBackend-fdo-1.0.so" \ | |
| --set GIO_MODULE_DIR "${glib-networking}/lib/gio/modules" \ | |
| --set WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS "1" \ | |
| --prefix PATH : "${wpewebkit}/libexec/wpe-webkit-2.0" | |
| '' else '' | |
| wrapProgram $out/bin/emacs \ | |
| --set GIO_MODULE_DIR "${glib-networking}/lib/gio/modules" | |
| ''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ;;; site-start.el --- Nix package startup stub -*- lexical-binding: t; -*- | ||
|
|
||
| ;; Home Manager and other Nix-based Emacs integrations may expect the | ||
| ;; package site startup file to exist, even when the package does not need | ||
| ;; site-wide initialization of its own. | ||
|
|
||
| (provide 'site-start) | ||
|
|
||
| ;;; site-start.el ends here |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
install -Dm644 ${./site-start.el} ...block duplicates the one in the Linux branch above. To reduce duplication and make future edits less error-prone, install the stub once outside the platform conditional and keep only platform-specific wrapping inside each branch.