Last active
October 12, 2022 09:39
-
-
Save sigma/0a662ad9905e85f673ad42164a59bfbb to your computer and use it in GitHub Desktop.
sample flake.nix for emacs projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use flake | |
eval "$shellHook" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "codex dev environment"; | |
inputs = { | |
nixpkgs.url = github:nixos/nixpkgs/21.11; | |
flake-utils.url = github:numtide/flake-utils; | |
multi-emacs.url = github:sigma/multi-emacs; | |
multi-emacs.inputs.nixpkgs.follows = "nixpkgs"; | |
multi-emacs.inputs.flake-utils.follows = "flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils, multi-emacs }: | |
flake-utils.lib.eachDefaultSystem (system: { | |
devShell = | |
let | |
pkgs = import nixpkgs { | |
inherit system; | |
overlays = [ | |
multi-emacs.overlay | |
]; | |
}; | |
in | |
pkgs.devshell.mkShell { | |
packages = [ | |
(pkgs.multiEmacs { | |
wrapper = emacs: pkgs.emacsWithPackagesFromPackageRequires { | |
package = emacs; | |
packageElisp = builtins.readFile ./codex.el; | |
}; | |
flavors = [ | |
pkgs.emacs-25-1 pkgs.emacs-25-2 pkgs.emacs-25-3 | |
pkgs.emacs-26-1 pkgs.emacs-26-2 pkgs.emacs-26-3 | |
pkgs.emacs-27-1 pkgs.emacs-27-2 | |
pkgs.emacs-snapshot | |
]; | |
}) | |
]; | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment