Skip to content

Commit

Permalink
test: Switch to the flake package of nix-emacs-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
akirak committed Sep 5, 2023
1 parent 19fb57b commit 9dbdb09
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
17 changes: 17 additions & 0 deletions test/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions test/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
};

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
twist.url = "github:emacs-twist/twist.nix";
home-manager.url = "github:nix-community/home-manager";
Expand All @@ -26,13 +27,11 @@
flake = false;
};

emacs-ci = {
url = "github:purcell/nix-emacs-ci";
flake = false;
};
emacs-ci.url = "github:purcell/nix-emacs-ci";
};

outputs = {
nixpkgs,
flake-utils,
emacs-ci,
self,
Expand Down Expand Up @@ -64,23 +63,27 @@
]);
}
// flake-utils.lib.eachDefaultSystem (system: let
nixpkgs = nixpkgsFor system;

pkgs = import nixpkgs {
inherit system;
overlays = [
(import (emacs-ci.outPath + "/overlay.nix"))
# emacs-unstable.overlay
inputs.twist.overlays.default
];
};

inherit (pkgs) lib;

emacs = pkgs.callPackage ./twist.nix {inherit inputs;};
emacsPackage = emacs-ci.packages.${system}.emacs-snapshot;

emacs = pkgs.callPackage ./twist.nix {
inherit inputs;
inherit emacsPackage;
};

# Another test path to build the whole derivation (not with --dry-run).
emacs-wrapper = pkgs.callPackage ./twist-minimal.nix {};
emacs-wrapper = pkgs.callPackage ./twist-minimal.nix {
inherit emacsPackage;
};

# This is an example of interactive Emacs session.
# You can start Emacs by running `nix run .#emacs-interactive`.
Expand Down
4 changes: 2 additions & 2 deletions test/twist-minimal.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
emacsTwist,
emacs-28-2,
emacsPackage,
}:
emacsTwist {
emacsPackage = emacs-28-2.overrideAttrs (_: {version = "20221201.0";});
inherit emacsPackage;
initFiles = [];
lockDir = ./lock;
inventories = [];
Expand Down
6 changes: 3 additions & 3 deletions test/twist.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
emacsTwist,
emacs-snapshot,
emacsPackage,
inputs,
}:
emacsTwist {
# Use nix-emacs-ci which is more lightweight than a regular build
emacsPackage = emacs-snapshot;
inherit emacsPackage;
# In an actual configuration, you would use this:
# emacs = pkgs.emacsPgtkGcc.overrideAttrs (_: { version = "29.0.50"; });
initFiles = [
Expand All @@ -16,7 +16,7 @@ emacsTwist {
{
type = "elpa";
path = inputs.gnu-elpa.outPath + "/elpa-packages";
core-src = emacs-snapshot.src;
core-src = emacsPackage.src;
auto-sync-only = true;
}
{
Expand Down

0 comments on commit 9dbdb09

Please sign in to comment.