Drop flake-parts

It's not really doing much for me, and it might be getting in the way of
my attempt at exposing a non-package in the `packages` flake output.
This commit is contained in:
Marien Zwart 2024-04-06 23:41:35 +11:00
parent dbeda09006
commit 03769febeb
No known key found for this signature in database
2 changed files with 12 additions and 51 deletions

35
flake.lock generated
View file

@ -38,22 +38,6 @@
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"path": "/nix/store/xvyy5vh6cg7958a26p2bqyz6jg5wkz4g-source",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "path"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -88,24 +72,6 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1712310679,
@ -123,7 +89,6 @@
"inputs": {
"doomemacs": "doomemacs",
"emacs-overlay": "emacs-overlay",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2"
}
},

View file

@ -1,6 +1,5 @@
{
inputs = {
flake-parts.url = "flake-parts";
nixpkgs.url = "nixpkgs";
doomemacs = {
url = "github:doomemacs/doomemacs";
@ -14,25 +13,22 @@
};
};
outputs = inputs@{ self, doomemacs, nixpkgs, emacs-overlay, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
perSystem = { self', inputs', system, pkgs, lib, ... }:
outputs = { doomemacs, nixpkgs, emacs-overlay, ... }: let
systems = [ "x86_64-linux" ];
perSystemPackages = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in {
packages = perSystemPackages (pkgs:
let
common = { doomSource = doomemacs; emacs = pkgs.emacs29-pgtk; };
in
{
pkgsWithEmacsOverlay = pkgs.extend emacs-overlay.overlays.package;
in {
# Current Doom + NixOS 23.11 requires emacs-overlay: Doom pins
# emacs-fish-completion, which moved from gitlab to github recently
# enough stable nixpkgs pulls it from the wrong source.
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ emacs-overlay.overlays.package ];
};
packages.doom-minimal = pkgs.callPackage ./doom.nix common;
packages.doom-full = pkgs.callPackage ./doom.nix (common // { full = true; });
packages.doom-example = pkgs.callPackage ./doom.nix (common // { doomDir = ./example; });
packages.doomEmacs = args: pkgs.callPackage ./doom.nix args;
};
doom-minimal = pkgsWithEmacsOverlay.callPackage ./doom.nix common;
doom-full = pkgsWithEmacsOverlay.callPackage ./doom.nix (common // { full = true; });
doom-example = pkgsWithEmacsOverlay.callPackage ./doom.nix (common // { doomDir = ./example; });
doomEmacs = args: pkgsWithEmacsOverlay.callPackage ./doom.nix args;
});
};
}