diff options
author | adisbladis <adisbladis@gmail.com> | 2023-06-01 16:47:52 +1200 |
---|---|---|
committer | adisbladis <adisbladis@gmail.com> | 2023-06-01 17:14:36 +1200 |
commit | fdf09998a0484722757cfd5672a8b745bec982bb (patch) | |
tree | 1f1c9f0f7912b63ccc16bb79906b28c404a0f724 | |
parent | 9a0f8decb5be3cd0020888426cc4a3bc1fc5d67d (diff) | |
download | nixlib-fdf09998a0484722757cfd5672a8b745bec982bb.tar nixlib-fdf09998a0484722757cfd5672a8b745bec982bb.tar.gz nixlib-fdf09998a0484722757cfd5672a8b745bec982bb.tar.bz2 nixlib-fdf09998a0484722757cfd5672a8b745bec982bb.tar.lz nixlib-fdf09998a0484722757cfd5672a8b745bec982bb.tar.xz nixlib-fdf09998a0484722757cfd5672a8b745bec982bb.tar.zst nixlib-fdf09998a0484722757cfd5672a8b745bec982bb.zip |
Align with nixpkgs attribute syntax since https://github.com/NixOS/nixpkgs/pull/233301
-rw-r--r-- | flake.nix | 24 | ||||
-rw-r--r-- | overlays/emacs.nix | 54 |
2 files changed, 42 insertions, 36 deletions
diff --git a/flake.nix b/flake.nix index 96f57b98e641..258e543f86ec 100644 --- a/flake.nix +++ b/flake.nix @@ -34,27 +34,23 @@ # for backward compatibility, is safe to delete, not referenced anywhere overlay = self.overlays.default; } // flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: - let - pkgs = importPkgs nixpkgs { inherit system; }; - inherit (pkgs) lib; - in { hydraJobs = let mkHydraJobs = pkgs: let mkEmacsSet = emacs: pkgs.recurseIntoAttrs ( - lib.filterAttrs - (n: v: builtins.typeOf v == "set" && ! lib.isDerivation v) + pkgs.lib.filterAttrs + (n: v: builtins.typeOf v == "set" && ! pkgs.lib.isDerivation v) (pkgs.emacsPackagesFor emacs) ); in { emacsen = { - inherit (pkgs) emacsUnstable emacsUnstable-nox; - inherit (pkgs) emacsGit emacsGit-nox; - inherit (pkgs) emacsPgtk; + inherit (pkgs) emacs-unstable emacs-unstable-nox; + inherit (pkgs) emacs-git emacs-git-nox; + inherit (pkgs) emacs-pgtk; }; emacsen-cross = @@ -69,20 +65,20 @@ in lib.mapAttrs' (name: job: lib.nameValuePair "${name}-${target}" job) ({ - inherit (targetPkgs) emacsUnstable emacsUnstable-nox; - inherit (targetPkgs) emacsGit emacsGit-nox; - inherit (targetPkgs) emacsPgtk; + inherit (targetPkgs) emacs-unstable emacs-unstable-nox; + inherit (targetPkgs) emacs-git emacs-git-nox; + inherit (targetPkgs) emacs-pgtk; })) crossTargets); packages = mkEmacsSet pkgs.emacs; - packages-unstable = mkEmacsSet pkgs.emacsUnstable; + packages-unstable = mkEmacsSet pkgs.emacs-unstable; }; in { "22.11" = mkHydraJobs (importPkgs nixpkgs-stable { inherit system; }); - "unstable" = mkHydraJobs pkgs; + "unstable" = mkHydraJobs (importPkgs nixpkgs { inherit system; };); }; }) // flake-utils.lib.eachDefaultSystem (system: ( let diff --git a/overlays/emacs.nix b/overlays/emacs.nix index 696cb79cc5d8..e0523eb8248e 100644 --- a/overlays/emacs.nix +++ b/overlays/emacs.nix @@ -88,7 +88,7 @@ let ) ]); - emacsGit = let base = (super.lib.makeOverridable (mkGitEmacs "emacs-git" ../repos/emacs/emacs-master.json) { withSQLite3 = true; withWebP = true; }); + emacs-git = let base = (super.lib.makeOverridable (mkGitEmacs "emacs-git" ../repos/emacs/emacs-master.json) { withSQLite3 = true; withWebP = true; }); # TODO: remove when we drop support for < 23.05, and instead move withTreeSitter to the above line with the other arguments maybeOverridden = if super.lib.hasAttr "treeSitter" base then base.override { withTreeSitter = true; } else base; in @@ -100,7 +100,7 @@ let ]; } ); - emacsPgtk = let base = super.lib.makeOverridable (mkGitEmacs "emacs-pgtk" ../repos/emacs/emacs-master.json) { withSQLite3 = true; withWebP = true; withPgtk = true; }; + emacs-pgtk = let base = super.lib.makeOverridable (mkGitEmacs "emacs-pgtk" ../repos/emacs/emacs-master.json) { withSQLite3 = true; withWebP = true; withPgtk = true; }; # TODO: remove when we drop support for < 23.05, and instead move withTreeSitter to the above line with the other arguments maybeOverridden = if super.lib.hasAttr "treeSitter" base then base.override { withTreeSitter = true; } else base; in maybeOverridden.overrideAttrs ( @@ -111,30 +111,24 @@ let ]; } ); - emacsUnstable = let base = super.lib.makeOverridable (mkGitEmacs "emacs-unstable" ../repos/emacs/emacs-unstable.json) { withSQLite3 = true; withWebP = true; }; + emacs-unstable = let base = super.lib.makeOverridable (mkGitEmacs "emacs-unstable" ../repos/emacs/emacs-unstable.json) { withSQLite3 = true; withWebP = true; }; # TODO: remove when we drop support for < 23.05, and instead move withTreeSitter to the above line with the other arguments maybeOverridden = if super.lib.hasAttr "treeSitter" base then base.override { withTreeSitter = true; } else base; in maybeOverridden; - emacsUnstablePgtk = let base = super.lib.makeOverridable (mkGitEmacs "emacs-unstable" ../repos/emacs/emacs-unstable.json) { withSQLite3 = true; withWebP = true; withPgtk = true; }; + emacs-unstable-pgtk = let base = super.lib.makeOverridable (mkGitEmacs "emacs-unstable" ../repos/emacs/emacs-unstable.json) { withSQLite3 = true; withWebP = true; withPgtk = true; }; # TODO: remove when we drop support for < 23.05, and instead move withTreeSitter to the above line with the other arguments maybeOverridden = if super.lib.hasAttr "treeSitter" base then base.override { withTreeSitter = true; } else base; in maybeOverridden; - emacsLsp = let base = super.lib.makeOverridable (mkGitEmacs "emacs-lsp" ../repos/emacs/emacs-lsp.json) { }; + emacs-lsp = let base = super.lib.makeOverridable (mkGitEmacs "emacs-lsp" ../repos/emacs/emacs-lsp.json) { }; # TODO: remove when we drop support for < 23.05, and instead move withTreeSitter to the above line with the other arguments maybeOverridden = if super.lib.hasAttr "treeSitter" base then base.override { withTreeSitter = false; } else base; in maybeOverridden; -in -{ - inherit emacsGit emacsUnstable; - - inherit emacsPgtk emacsUnstablePgtk; - - emacsGit-nox = ( + emacs-git-nox = ( ( - emacsGit.override { + emacs-git.override { withNS = false; withX = false; withGTK2 = false; @@ -148,9 +142,9 @@ in ) ); - emacsUnstable-nox = ( + emacs-unstable-nox = ( ( - emacsUnstable.override { + emacs-unstable.override { withNS = false; withX = false; withGTK2 = false; @@ -164,17 +158,33 @@ in ) ); - inherit emacsLsp; +in +{ + inherit emacs-git emacs-unstable; + + inherit emacs-pgtk emacs-unstable-pgtk; + + inherit emacs-git-nox emacs-unstable-nox; + + inherit emacs-lsp; emacsWithPackagesFromUsePackage = import ../elisp.nix { pkgs = self; }; emacsWithPackagesFromPackageRequires = import ../packreq.nix { pkgs = self; }; } // super.lib.optionalAttrs (super.config.allowAliases or true) { - emacsGcc = builtins.trace "emacsGcc has been renamed to emacsGit, please update your expression." emacsGit; - emacsGitNativeComp = builtins.trace "emacsGitNativeComp has been renamed to emacsGit, please update your expression." emacsGit; - emacsGitTreeSitter = builtins.trace "emacsGitTreeSitter has been renamed to emacsGit, please update your expression." emacsGit; - emacsNativeComp = builtins.trace "emacsNativeComp has been renamed to emacsUnstable, please update your expression." emacsUnstable; - emacsPgtkGcc = builtins.trace "emacsPgtkGcc has been renamed to emacsPgtk, please update your expression." emacsPgtk; - emacsPgtkNativeComp = builtins.trace "emacsPgtkNativeComp has been renamed to emacsPgtk, please update your expression." emacsPgtk; + emacsGcc = builtins.trace "emacsGcc has been renamed to emacs-git, please update your expression." emacs-git; + emacsGitNativeComp = builtins.trace "emacsGitNativeComp has been renamed to emacs-git, please update your expression." emacs-git; + emacsGitTreeSitter = builtins.trace "emacsGitTreeSitter has been renamed to emacs-git, please update your expression." emacs-git; + emacsNativeComp = builtins.trace "emacsNativeComp has been renamed to emacs-unstable, please update your expression." emacs-unstable; + emacsPgtkGcc = builtins.trace "emacsPgtkGcc has been renamed to emacs-pgtk, please update your expression." emacs-pgtk; + emacsPgtkNativeComp = builtins.trace "emacsPgtkNativeComp has been renamed to emacs-pgtk, please update your expression." emacs-pgtk; + + emacsGit = builtins.trace "emacsGit has been renamed to emacs-git, please update your expression." emacs-git; + emacsUnstable = builtins.trace "emacsUnstable has been renamed to emacs-unstable, please update your expression." emacs-unstable; + emacsPgtk = builtins.trace "emacsPgtk has been renamed to emacs-pgtk, please update your expression." emacs-pgtk; + emacsUnstablePgtk = builtins.trace "emacsUnstablePgtk has been renamed to emacs-unstable-pgtk, please update your expression." emacs-unstable-pgtk; + emacsGitNox = builtins.trace "emacsGitNox has been renamed to emacs-git-nox, please update your expression." emacs-git-nox; + emacsUnstableNox = builtins.trace "emacsUnstableNox has been renamed to emacs-unstable-nox, please update your expression." emacs-unstable-nox; + emacsLsp = builtins.trace "emacsLsp has been renamed to emacs-lsp, please update your expression." emacs-lsp; } |