Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
New option to specify emacs package during build
Browse files Browse the repository at this point in the history
  • Loading branch information
László Vaskó committed Nov 22, 2019
1 parent a449ef5 commit 10655c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{ # Package set to build the Emacs environment from
emacsPackages
# Emacs package to use during build
, emacs ? emacsPackages.emacs
# You may override to use your version of `straight`
, straight ? null
# Your `init.el` file to use for discovering and installing packages
Expand All @@ -14,7 +16,7 @@
, abortOnNotFound ? false }:

let
libstraight = epkgs.callPackage ./libstraight.nix { inherit abortOnNotFound epkgs; };
libstraight = epkgs.callPackage ./libstraight.nix { inherit abortOnNotFound epkgs emacs; };
epkgs =
if straight == null then
emacsPackages.overrideScope' (self: super:
Expand Down
6 changes: 3 additions & 3 deletions libstraight.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ abortOnNotFound ? true,
lib, stdenv, epkgs, writeScript }:
lib, stdenv, epkgs, emacs, writeScript }:

let
inherit (builtins) filter trace;
Expand Down Expand Up @@ -45,7 +45,7 @@ let

packagesJSON = { emacsInitFile, emacsLoadFiles, emacsArgs }: stdenv.mkDerivation {
name = "emacs-straight-packages.json";
buildInputs = [ epkgs.emacs ];
buildInputs = [ emacs ];
buildPhase = ":";
installPhase = ''
runHook preInstall
Expand All @@ -63,7 +63,7 @@ let
emacsEnv = { emacsInitFile, emacsLoadFiles, emacsArgs }: { packages, straightDir }: stdenv.mkDerivation {
name = "straight-emacs-env";
buildPhase = ":";
buildInputs = [ epkgs.emacs ];
buildInputs = [ emacs ];
installPhase = ''
runHook preInstall
Expand Down

0 comments on commit 10655c5

Please sign in to comment.