-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
nyxt: fix darwin build #126082
base: master
Are you sure you want to change the base?
nyxt: fix darwin build #126082
Conversation
|
||
GST_PLUGIN_SYSTEM_PATH_1_0 = lib.concatMapStringsSep ":" (p: "${p}/lib/gstreamer-1.0") gstBuildInputs; |
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.
Setting GST_PLUGIN_SYSTEM_PATH_1_0
is handled by wrapGApps
. It suffices to put these in buildInputs
.
glib gdk-pixbuf cairo | ||
mime-types pango gtk3 | ||
glib-networking gsettings-desktop-schemas | ||
xclip notify-osd enchant |
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.
xclip
in buildInputs
doesn't have any effect because it's a CLI tool, not a library. I've added xclip
to the wrapper instead.
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.
notify-osd
is removed since it's no longer needed. Details in #125113 (comment).
cp -f $src/lib/common-lisp/nyxt/assets/nyxt_''${i}x''${i}.png "$out/share/icons/hicolor/''${i}x''${i}/apps/nyxt.png" | ||
done | ||
|
||
mkdir -p $out/bin && makeWrapper $src/bin/nyxt $out/bin/nyxt \ |
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 didn't work because gappsWrapperArgs
is computed at preFixup
, which happens after installPhase
.
( | ||
source "$out/lib/common-lisp-settings"/*-shell-config.sh | ||
cd "$out/lib/common-lisp"/*/ | ||
makeFlags="''${makeFlags:-}" | ||
make LISP=common-lisp.sh NYXT_INTERNAL_QUICKLISP=false PREFIX="$out" $makeFlags all | ||
make LISP=common-lisp.sh NYXT_INTERNAL_QUICKLISP=false PREFIX="$out" $makeFlags install | ||
cp nyxt "$out/bin/nyxt" | ||
) |
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 was redundant because it creates a broken build artifact $out/bin/nyxt
which promptly gets rebuilt by the subsequent commands.
nix_lisp_build_system nyxt/gi-gtk-application \ | ||
"(asdf/system:component-entry-point (asdf:find-system :nyxt/gi-gtk-application))" \ | ||
"" \ | ||
"(format *error-output* \"Alien objects:~%~s~%\" sb-alien::*shared-objects*)" | ||
' "$out/bin/nyxt-lisp-launcher.sh" | ||
cp "$out/lib/common-lisp/nyxt/nyxt" "$out/bin/" | ||
|
||
mv "$out/lib/common-lisp/nyxt/nyxt" "$out/bin/" |
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.
Replaces the GTK backend with the GI-GTK one.
) | ||
|
||
# clear unnecessary environment variables to avoid hitting the limit | ||
env -i \ |
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.
It's necessary to clear unnecessary environment variables because otherwise it hits the length limit imposed by the OS. This is similar to what is done in lisp-modules/define-package.nix
:
nixpkgs/pkgs/development/lisp-modules/define-package.nix
Lines 89 to 99 in 8284fc3
env -i \ | |
NIX_LISP="$NIX_LISP" \ | |
NIX_LISP_PRELAUNCH_HOOK='nix_lisp_run_single_form "(progn | |
${lib.concatMapStrings (system: '' | |
(asdf:compile-system :${system}) | |
(asdf:load-system :${system}) | |
(asdf:operate (quote asdf::compile-bundle-op) :${system}) | |
(ignore-errors (asdf:operate (quote asdf::deploy-asd-op) :${system})) | |
'') buildSystems} | |
)"' \ | |
"$out/bin/${args.baseName}-lisp-launcher.sh" |
Result of 1 package failed to build:1 package built successfully:
2 suggestions:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. Result of 1 package failed to build:Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. |
d2a2089
to
45f126d
Compare
I've pushed a few more fixes that does the following:
|
Result of 2 packages built:
|
The changes look good to me:
|
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
ff5c3a0
to
a7556aa
Compare
I've now renamed Also rebased to fix the merge conflict in the release notes. |
a7556aa
to
c6598c6
Compare
Result of 1 package built:
|
I marked this as stale due to inactivity. → More info |
Motivation for this change
Continuation of #125113.
Keyboard input is still not working, but it turned out to be an issue with WebKitGTK so I'm preparing a separate issue for it. Currently, all packages using WebKitGTK would have the same issue on Darwin.
ping @mjlbach
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)