lol

Merge pull request #127980 from matthewbauer/darwin-emacs-native-comp

Add gcc for emacs wrapper so native-comp works

authored by

Matthew Bauer and committed by
GitHub
ff327f36 085084a3

+16 -11
+2 -2
pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix
··· 21 21 22 22 */ 23 23 24 - { lib, stdenv, texinfo, writeText }: 24 + { lib, stdenv, texinfo, writeText, gcc }: 25 25 26 26 self: let 27 27 ··· 32 32 }; 33 33 34 34 elpaBuild = import ../../../../build-support/emacs/elpa.nix { 35 - inherit lib stdenv texinfo writeText; 35 + inherit lib stdenv texinfo writeText gcc; 36 36 inherit (self) emacs; 37 37 }; 38 38
+2 -2
pkgs/build-support/emacs/elpa.nix
··· 1 1 # builder for Emacs packages built for packages.el 2 2 3 - { lib, stdenv, emacs, texinfo, writeText }: 3 + { lib, stdenv, emacs, texinfo, writeText, gcc }: 4 4 5 5 with lib; 6 6 ··· 19 19 20 20 in 21 21 22 - import ./generic.nix { inherit lib stdenv emacs texinfo writeText; } ({ 22 + import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({ 23 23 24 24 phases = "installPhase fixupPhase distPhase"; 25 25
+3 -1
pkgs/build-support/emacs/generic.nix
··· 1 1 # generic builder for Emacs packages 2 2 3 - { lib, stdenv, emacs, texinfo, writeText, ... }: 3 + { lib, stdenv, emacs, texinfo, writeText, gcc, ... }: 4 4 5 5 with lib; 6 6 ··· 71 71 // lib.optionalAttrs (emacs.nativeComp or false) { 72 72 73 73 LIBRARY_PATH = "${lib.getLib stdenv.cc.libc}/lib"; 74 + 75 + nativeBuildInputs = [ gcc ]; 74 76 75 77 addEmacsNativeLoadPath = true; 76 78
+2 -2
pkgs/build-support/emacs/melpa.nix
··· 1 1 # builder for Emacs packages built for packages.el 2 2 # using MELPA package-build.el 3 3 4 - { lib, stdenv, fetchFromGitHub, emacs, texinfo, writeText }: 4 + { lib, stdenv, fetchFromGitHub, emacs, texinfo, writeText, gcc }: 5 5 6 6 with lib; 7 7 ··· 28 28 29 29 in 30 30 31 - import ./generic.nix { inherit lib stdenv emacs texinfo writeText; } ({ 31 + import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({ 32 32 33 33 ename = 34 34 if ename == null
+5 -2
pkgs/build-support/emacs/wrapper.nix
··· 32 32 33 33 */ 34 34 35 - { lib, lndir, makeWrapper, runCommand }: self: 35 + { lib, lndir, makeWrapper, runCommand, gcc }: self: 36 36 37 37 with lib; 38 38 ··· 65 65 # Store all paths we want to add to emacs here, so that we only need to add 66 66 # one path to the load lists 67 67 deps = runCommand "emacs-packages-deps" 68 - { inherit explicitRequires lndir emacs; } 68 + { 69 + inherit explicitRequires lndir emacs; 70 + nativeBuildInputs = lib.optional nativeComp gcc; 71 + } 69 72 '' 70 73 findInputsOld() { 71 74 local pkg="$1"; shift
+2 -2
pkgs/top-level/emacs-packages.nix
··· 26 26 let 27 27 28 28 mkElpaPackages = { pkgs, lib }: import ../applications/editors/emacs/elisp-packages/elpa-packages.nix { 29 - inherit (pkgs) stdenv texinfo writeText; 29 + inherit (pkgs) stdenv texinfo writeText gcc; 30 30 inherit lib; 31 31 }; 32 32 ··· 44 44 }; 45 45 46 46 emacsWithPackages = { pkgs, lib }: import ../build-support/emacs/wrapper.nix { 47 - inherit (pkgs) makeWrapper runCommand; 47 + inherit (pkgs) makeWrapper runCommand gcc; 48 48 inherit (pkgs.xorg) lndir; 49 49 inherit lib; 50 50 };