dev: update shell.nix

This commit is contained in:
Henrik Lissner
2025-09-10 23:18:42 -04:00
parent c8d3d77b0b
commit 84c197108e

View File

@@ -13,13 +13,25 @@
#
# With a specific version of Emacs
#
# nix-shell --argstr emacs 26.3 # 26.3
# nix-shell --argstr emacs 27.1 # 27.1
# nix-shell --argstr emacs 27.2 # 27.2
# nix-shell --argstr emacs 28.1 # 28.1
# nix-shell --argstr emacs 28.2 # 28.2
# nix-shell --argstr emacs 29.1 # 29.1
# nix-shell --argstr emacs head # 30.0.50
# nix-shell --argstr emacs 26.1
# nix-shell --argstr emacs 26.2
# nix-shell --argstr emacs 26.3
# nix-shell --argstr emacs 26 # 26.3
# nix-shell --argstr emacs 27.1
# nix-shell --argstr emacs 27.2
# nix-shell --argstr emacs 27 # 27
# nix-shell --argstr emacs 28.1
# nix-shell --argstr emacs 28.2
# nix-shell --argstr emacs 28 # 28
# nix-shell --argstr emacs 29.1
# nix-shell --argstr emacs 29.2
# nix-shell --argstr emacs 29.3
# nix-shell --argstr emacs 29.4
# nix-shell --argstr emacs 29 # 29.4
# nix-shell --argstr emacs 30.1
# nix-shell --argstr emacs 30.2
# nix-shell --argstr emacs 30 # 30.2
# nix-shell --argstr emacs head # 31.0.50
# nix-shell --argstr emacs ci-26.3 # 26.3 (barebones; no GUI)
# nix-shell --argstr emacs ci-27.1 # 27.1 (barebones; no GUI)
# nix-shell --argstr emacs ci-27.2 # 27.2 (barebones; no GUI)
@@ -28,45 +40,57 @@
# nix-shell --argstr emacs ci-29.1 # 29.1 (barebones; no GUI)
# nix-shell --argstr emacs ci-HEAD # 30.0.50 (barebones; no GUI)
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/22.05.tar.gz")
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/24.11.tar.gz")
{
overlays = [
# emacs-overlay: provides EmacsGit, EmacsNativeComp, and EmacsPgtkNativeComp
(import (fetchTarball "https://github.com/nix-community/emacs-overlay/archive/88e410d7f1ddef554b40f66755626e5c883487d9.tar.gz"))
# nix-emacs-ci: provides CI versions of Emacs 26.3, 27.1, 27.2, 28.1, 28.2, and snapshot
(_: _: (import (fetchTarball "https://github.com/purcell/nix-emacs-ci/archive/master.tar.gz")))
# emacs{26,27-{1,2},28-1}
(_: _: {
emacs26 = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/11264a390b197b80edeffac6f20e582f3ea318bd.tar.gz") {}).emacs26;
emacs27-1 = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/11264a390b197b80edeffac6f20e582f3ea318bd.tar.gz") {}).emacs;
emacs27-2 = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25.tar.gz") {}).emacs;
emacs28-1 = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/54e795706d9fa90004ed1274af639a717f04a2aa.tar.gz") {}).emacs;
emacs29-1 = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/c434383f2a4866a7c674019b4cdcbfc55db3c4ab.tar.gz") {}).emacs29;
})
];
}
, emacs ? "29.1"
, emacs ? "30.2"
, emacsdir ? "$(pwd)"
, doomdir ? ""
, doomlocaldir ? "$EMACSDIR/.local" }:
let emacsPkg = (if emacs == "26.3" then pkgs.emacs26
else if emacs == "27.1" then pkgs.emacs27-1
else if emacs == "27.2" then pkgs.emacs27-2
else if emacs == "28.1" then pkgs.emacs28-1
else if emacs == "28.2" then pkgs.emacs
else if emacs == "29.1" then pkgs.emacs29-1
else if emacs == "head" then pkgs.emacsGit
else if emacs == "ci-26.3" then pkgs.emacs-26-3
else if emacs == "ci-27.1" then pkgs.emacs-27-1
else if emacs == "ci-27.2" then pkgs.emacs-27-2
else if emacs == "ci-28.1" then pkgs.emacs-28-1
else if emacs == "ci-28.2" then pkgs.emacs-28-2
else if emacs == "ci-29.1" then pkgs.emacs-29-1
else if emacs == "ci-head" then pkgs.emacs-snapshot
else pkgs.emacs);
let getNixpkgs = rev: import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz") {};
emacsPkg = (rec {
"26.1" = (getNixpkgs "19.03").emacs26;
"26.2" = (getNixpkgs "2255f292063ccbe184ff8f9b35ce475c04d5ae69").emacs26;
"26.3" = (getNixpkgs "20.09").emacs26;
"26" = (getNixpkgs "20.09").emacs26;
"27.1" = (getNixpkgs "20.09").emacs27;
"27.2" = (getNixpkgs "21.11").emacs27;
"27" = (getNixpkgs "21.11").emacs27;
"28.1" = (getNixpkgs "22.05").emacs28;
"28.2" = (getNixpkgs "24.11").emacs28;
"28" = (getNixpkgs "24.11").emacs28;
"29.1" = (getNixpkgs "23.11").emacs29;
"29.2" = (getNixpkgs "d3635821355bd04098e8139145eecdcaa30c1d4e").emacs29;
"29.3" = (getNixpkgs "24.05").emacs29;
"29.4" = (getNixpkgs "24.11").emacs29;
"29" = (getNixpkgs "24.11").emacs29;
"30.1" = (getNixpkgs "25.05").emacs;
"30.2" = (getNixpkgs "nixos-25.05-small").emacs;
"30" = (getNixpkgs "nixos-25.05-small").emacs;
"head" = pkgs.emacsGit;
"ci-26.1" = pkgs.emacs-26-1;
"ci-26.2" = pkgs.emacs-26-2;
"ci-26.3" = pkgs.emacs-26-3;
"ci-27.1" = pkgs.emacs-27-1;
"ci-27.2" = pkgs.emacs-27-2;
"ci-28.1" = pkgs.emacs-28-1;
"ci-28.2" = pkgs.emacs-28-2;
"ci-29.1" = pkgs.emacs-29-1;
"ci-29.2" = pkgs.emacs-29-2;
"ci-29.3" = pkgs.emacs-29-3;
"ci-30.1" = pkgs.emacs-30-1;
"ci-30.2" = pkgs.emacs-30-2;
"ci-head" = pkgs.emacs-snapshot;
})."${emacs}";
in pkgs.stdenv.mkDerivation {
name = "doom-emacs";
name = "doomemacs";
buildInputs = [
emacsPkg