Skip to content

Commit 83b9ab9

Browse files
committed
Use evalPkgs to ensure nix flake check still works
Related to NixOS/nix#4265
1 parent 3a5476b commit 83b9ab9

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

README.org

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4398,9 +4398,10 @@ we have some options that can be provided...
43984398
, config ? {}
43994399
, overlays ? []
44004400
, pkgs ? import <nixpkgs> { inherit crossSystem system config overlays; }
4401+
, evalPkgs ? pkgs
44014402
, ensure ? f: n: f
44024403
, small ? pkgs.config.bauer.small or true
4403-
, emacs-overlay ? { overlay = import (pkgs.fetchFromGitHub {
4404+
, emacs-overlay ? { overlay = import (evalPkgs.fetchFromGitHub {
44044405
owner = "nix-community";
44054406
repo = "emacs-overlay";
44064407
rev = "28c31e0ae90b6fcf51f2d02c5d43fe1715dc6393";
@@ -4506,18 +4507,18 @@ Emacs configuration. use-package-list generates this list automatically.
45064507

45074508
#+BEGIN_SRC nix
45084509
package-list =
4509-
runCommand "package-list" {
4510-
buildInputs = [ customEmacsPackages.emacs ];
4510+
evalPkgs.runCommand "package-list" {
4511+
buildInputs = [ evalPkgs.emacs ];
45114512
} ''
45124513
#+END_SRC
45134514

45144515
#+BEGIN_SRC nix
45154516
emacs --batch --quick \
4516-
-L ${customEmacsPackages.use-package
4517+
-L ${evalPkgs.emacsPackages.use-package
45174518
}/share/emacs/site-lisp/elpa/use-package-* \
4518-
-L ${customEmacsPackages.delight
4519+
-L ${evalPkgs.emacsPackages.delight
45194520
}/share/emacs/site-lisp/elpa/delight-* \
4520-
-L ${customEmacsPackages.bind-key
4521+
-L ${evalPkgs.emacsPackages.bind-key
45214522
}/share/emacs/site-lisp/elpa/bind-key-* \
45224523
-l ${ensure ./site-lisp/set-defaults.el
45234524
"site-lisp/set-defaults.el"} \
@@ -5327,8 +5328,9 @@ in {
53275328
packages = forAllSystems (system: {
53285329
bauer = let
53295330
pkgs = nixpkgsFor.${system};
5330-
in import (pkgs.runCommand "README" {
5331-
buildInputs = with pkgs; [ emacs git ];
5331+
evalPkgs = nixpkgsFor.x86_64-linux;
5332+
in import (evalPkgs.runCommand "README" {
5333+
buildInputs = with evalPkgs; [ emacs git ];
53325334
} (''
53335335
install -D ${./README.org} $out/README.org
53345336
cd $out
@@ -5337,7 +5339,7 @@ in {
53375339
-l ob-tangle \
53385340
--eval "(org-babel-tangle-file \"README.org\")" > /dev/null
53395341
cp bauer.nix default.nix
5340-
'')) { inherit pkgs emacs-overlay; };
5342+
'')) { inherit pkgs emacs-overlay evalPkgs; };
53415343
});
53425344

53435345
defaultPackage = forAllSystems (system: self.packages.${system}.bauer);

flake.nix

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)