From 52d284f59d711a31efba97ca192b60a7be9bfbdb Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 6 Feb 2020 21:44:26 +0000 Subject: Remove assertions that prelude/executable-exists? I'm in the midst of transitioning onto a few new tools. My previous workflow just used `nix-env` to install *some* packages. I didn't have a prescribed methodology for which packages I would install using `nix-env` and which ones I would install using `sudo apt-get install`. Sometimes if a package would be available in my aptitude repositories, I'd use that; other times when it wasn't available I'd use `nix-env`. One complication about being on gLinux intead of NixOS is that some packages (e.g. nixpkgs.terminator) is available via `nix-env -iA nixpkgs.terminator`, but the installation won't actually run on my gLinux. In these instances, I would install terminator from the aptitude repositories. Then @tazjin introduced me to his Emacs configuration that he builds using Nix. What appealed to me about his built Emacs is that it worked as expected on either a NixOS machine and on gLinux (and presumably on other non-NixOS machines as well). A setup towards which I'm working is to own one or a few NixOS machines whose configurations are entirely managed with Nix. On devices like my work machines, which cannot run NixOS, I can build as much of the software that I need using Nix and attempt to minimize the ad hoc configuration either with shell scripts, python, golang, or more Nix code... it's clear that I still don't have a clear idea of how that part will work. For now, I'm adopting nix, nix-env, lorri, direnv, and weening off of aptitude as much as I can. Things are a bit messy, but my general trend feels positive. Stay tuned for more updates. --- emacs/.emacs.d/wpc/clipboard.el | 3 --- emacs/.emacs.d/wpc/scrot.el | 3 --- emacs/.emacs.d/wpc/wpc-golang.el | 3 --- emacs/.emacs.d/wpc/wpc-ocaml.el | 3 --- emacs/default.nix | 7 ++++++- 5 files changed, 6 insertions(+), 13 deletions(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/wpc/clipboard.el b/emacs/.emacs.d/wpc/clipboard.el index 0688c9d87fe0..5fad0fbd0567 100644 --- a/emacs/.emacs.d/wpc/clipboard.el +++ b/emacs/.emacs.d/wpc/clipboard.el @@ -19,9 +19,6 @@ (require 'prelude) (require 'ivy-clipmenu) -(prelude/assert (prelude/executable-exists? "clipmenu")) -(prelude/assert (prelude/executable-exists? "clipmenud")) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/emacs/.emacs.d/wpc/scrot.el b/emacs/.emacs.d/wpc/scrot.el index eeb12b3731e9..caeb25da3bcb 100644 --- a/emacs/.emacs.d/wpc/scrot.el +++ b/emacs/.emacs.d/wpc/scrot.el @@ -15,9 +15,6 @@ (require 'clipboard) (require 'kbd) -(prelude/assert - (prelude/executable-exists? "scrot")) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/emacs/.emacs.d/wpc/wpc-golang.el b/emacs/.emacs.d/wpc/wpc-golang.el index ef1387d38f92..2c4e6f1b36ae 100644 --- a/emacs/.emacs.d/wpc/wpc-golang.el +++ b/emacs/.emacs.d/wpc/wpc-golang.el @@ -12,9 +12,6 @@ (require 'prelude) -(prelude/assert (prelude/executable-exists? "goimports")) -(prelude/assert (prelude/executable-exists? "godef")) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Configuration ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/emacs/.emacs.d/wpc/wpc-ocaml.el b/emacs/.emacs.d/wpc/wpc-ocaml.el index 26add2d6f957..3a05263087f7 100644 --- a/emacs/.emacs.d/wpc/wpc-ocaml.el +++ b/emacs/.emacs.d/wpc/wpc-ocaml.el @@ -19,9 +19,6 @@ (require 'prelude) (require 'f) -(prelude/assert - (prelude/executable-exists? "opam")) - (defvar opam-user-setup "~/.emacs.d/opam-user-setup.el" "File for the OPAM Emacs integration.") diff --git a/emacs/default.nix b/emacs/default.nix index 24496bccc1e5..4e025ec1c061 100644 --- a/emacs/default.nix +++ b/emacs/default.nix @@ -6,7 +6,12 @@ let utils = import ~/briefcase/utils; - emacsBinPath = pkgs.lib.strings.makeBinPath [ pkgs.terminator ]; + emacsBinPath = pkgs.lib.strings.makeBinPath (with pkgs; [ + scrot + clipmenu + ocaml + ocamlformat + ]); emacsWithPackages = (pkgs.emacsPackagesNgGen pkgs.emacs26).emacsWithPackages; wpcarrosEmacs = emacsWithPackages (epkgs: (with epkgs.elpaPackages; [ -- cgit 1.4.1