summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-06-09 22:09:24 +0200
committerAlan Pearce2017-06-09 22:09:24 +0200
commit91316116c23af923dcdb828c03daad7eac3c8f9e (patch)
tree352918a209c5525fa2e6f76a310c6fdd66d34405
parentf659263a26f84c8f4540e3ede0b7eba6cad00e2a (diff)
downloaddotfiles-91316116c23af923dcdb828c03daad7eac3c8f9e.tar.lz
dotfiles-91316116c23af923dcdb828c03daad7eac3c8f9e.tar.zst
dotfiles-91316116c23af923dcdb828c03daad7eac3c8f9e.zip
nix: Parametrise use of macport
-rw-r--r--nix/.config/nixpkgs/emacs.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nix/.config/nixpkgs/emacs.nix b/nix/.config/nixpkgs/emacs.nix
index 87e7bba..cb879a5 100644
--- a/nix/.config/nixpkgs/emacs.nix
+++ b/nix/.config/nixpkgs/emacs.nix
@@ -1,7 +1,11 @@
-{ pkgs ? import <nixpkgs> {}, stdenv }:
+{
+  pkgs ? import <nixpkgs> {},
+  stdenv,
+  withMacPort ? stdenv.isDarwin
+}:
 
 let
-  myEmacs = if stdenv.isDarwin then pkgs.emacs25Macport else pkgs.emacs;
+  myEmacs = if withMacPort then pkgs.emacs25Macport else pkgs.emacs;
   emacsWithPackages = (pkgs.emacsPackagesNgGen myEmacs).emacsWithPackages;
 
   elpaBuild = import <nixpkgs/pkgs/build-support/emacs/elpa.nix> {