diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2021-06-12 11:21:35 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2021-06-23 23:02:11 -0500 |
commit | 8bc10fbc56db2aaf1f234349e4d0c7607b8ead4f (patch) | |
tree | 9260c3b8fdf1505258baa6d421de8a971dd3e4b8 /pkgs/build-support | |
parent | 65db0350fe3962c41b8604046ec9166976f80793 (diff) | |
download | nixpkgs-8bc10fbc56db2aaf1f234349e4d0c7607b8ead4f.tar nixpkgs-8bc10fbc56db2aaf1f234349e4d0c7607b8ead4f.tar.gz nixpkgs-8bc10fbc56db2aaf1f234349e4d0c7607b8ead4f.tar.bz2 nixpkgs-8bc10fbc56db2aaf1f234349e4d0c7607b8ead4f.tar.lz nixpkgs-8bc10fbc56db2aaf1f234349e4d0c7607b8ead4f.tar.xz nixpkgs-8bc10fbc56db2aaf1f234349e4d0c7607b8ead4f.tar.zst nixpkgs-8bc10fbc56db2aaf1f234349e4d0c7607b8ead4f.zip |
Add gcc for emacs wrapper so native-comp works
On macos, we don’t have a gcc executable by default, which is required for some reason when compiling site-start.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/emacs/elpa.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/emacs/generic.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/emacs/melpa.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/emacs/wrapper.nix | 7 |
4 files changed, 12 insertions, 7 deletions
diff --git a/pkgs/build-support/emacs/elpa.nix b/pkgs/build-support/emacs/elpa.nix index 41a0670d0c8..965b8d8189a 100644 --- a/pkgs/build-support/emacs/elpa.nix +++ b/pkgs/build-support/emacs/elpa.nix @@ -1,6 +1,6 @@ # builder for Emacs packages built for packages.el -{ lib, stdenv, emacs, texinfo, writeText }: +{ lib, stdenv, emacs, texinfo, writeText, gcc }: with lib; @@ -19,7 +19,7 @@ let in -import ./generic.nix { inherit lib stdenv emacs texinfo writeText; } ({ +import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({ phases = "installPhase fixupPhase distPhase"; diff --git a/pkgs/build-support/emacs/generic.nix b/pkgs/build-support/emacs/generic.nix index 1456d9e423d..ef154982ad0 100644 --- a/pkgs/build-support/emacs/generic.nix +++ b/pkgs/build-support/emacs/generic.nix @@ -1,6 +1,6 @@ # generic builder for Emacs packages -{ lib, stdenv, emacs, texinfo, writeText, ... }: +{ lib, stdenv, emacs, texinfo, writeText, gcc, ... }: with lib; @@ -72,6 +72,8 @@ stdenv.mkDerivation ({ LIBRARY_PATH = "${lib.getLib stdenv.cc.libc}/lib"; + nativeBuildInputs = [ gcc ]; + addEmacsNativeLoadPath = true; postInstall = '' diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix index 824611b20c8..5c41a66970e 100644 --- a/pkgs/build-support/emacs/melpa.nix +++ b/pkgs/build-support/emacs/melpa.nix @@ -1,7 +1,7 @@ # builder for Emacs packages built for packages.el # using MELPA package-build.el -{ lib, stdenv, fetchFromGitHub, emacs, texinfo, writeText }: +{ lib, stdenv, fetchFromGitHub, emacs, texinfo, writeText, gcc }: with lib; @@ -28,7 +28,7 @@ let in -import ./generic.nix { inherit lib stdenv emacs texinfo writeText; } ({ +import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({ ename = if ename == null diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index 571d0eb687c..6b53f3fdd95 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -32,7 +32,7 @@ in customEmacsPackages.emacs.pkgs.withPackages (epkgs: [ epkgs.evil epkgs.magit */ -{ lib, lndir, makeWrapper, runCommand }: self: +{ lib, lndir, makeWrapper, runCommand, gcc }: self: with lib; @@ -65,7 +65,10 @@ runCommand # Store all paths we want to add to emacs here, so that we only need to add # one path to the load lists deps = runCommand "emacs-packages-deps" - { inherit explicitRequires lndir emacs; } + { + inherit explicitRequires lndir emacs; + nativeBuildInputs = lib.optional nativeComp gcc; + } '' findInputsOld() { local pkg="$1"; shift |