From 3d8849e68bc198efeb8a179a4bcf32771d7967fe Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sat, 19 Nov 2022 10:20:12 -0800 Subject: fix(wpcarro/emacs): Support OSX build of Emacs **TL;DR:** Most of these changes predicate behavior on the platform: - At buildtime this is `localSystem == $something`. (`localSystem` is from `readTree`) - At runtime this is `(memq window-system '(ns))`. - Add `coreutils` so `dired` listing with `--group-directories-first` works because that flag depends on the GNU version of `ls`. **Background:** I need to support a bunch of OSX users at $WORK. As such, I'm planning on using my MBP for the next few weeks to build empathy for our userbase and polish some currently rough edges. If I'm going to get an serious work done, I need my Emacs setup. Step one is making sure it can build and run. Change-Id: I918efccfa5f149e218aeea476c2c7df1c7b64ae8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7309 Autosubmit: wpcarro Tested-by: BuildkiteCI Reviewed-by: wpcarro --- users/wpcarro/common.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'users/wpcarro/common.nix') diff --git a/users/wpcarro/common.nix b/users/wpcarro/common.nix index dcda9e10a4b0..4e960bee4ec5 100644 --- a/users/wpcarro/common.nix +++ b/users/wpcarro/common.nix @@ -44,7 +44,7 @@ in # machines. shell-utils = with pkgs; [ bat - dig + coreutils direnv diskus emacs @@ -55,13 +55,11 @@ in gnupg htop jq - mkpasswd nmap pass python3 rink ripgrep - sysz tldr tokei tree @@ -71,5 +69,14 @@ in # wpcarro.tools.simple_vim xclip zip - ]; + ] ++ + (if pkgs.stdenv.isLinux then [ + mkpasswd + sysz + # This depends on compiler-rt-libc-10.0.1, which is marked as broken on + # aarch64-darwin, but depot sets `allowBroken = true`, which means any + # build that depends on dig will fail on OSX (e.g. emacs). + # https://cs.tvl.fyi/github.com/NixOS/nixpkgs@e9b195248c6cd7961a453b10294aea9ab58e01b4/-/blob/pkgs/development/compilers/llvm/10/compiler-rt/default.nix?L122 + dig + ] else [ ]); } -- cgit 1.4.1