Replace flake-utils with flake-part

This commit is contained in:
Sameer Rahmani 2024-04-10 14:19:14 +01:00
parent 17e766cb32
commit e6f3fd58ab
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
3 changed files with 86 additions and 75 deletions

1
.gitignore vendored
View File

@ -65,3 +65,4 @@ flycheck_*.el
# Added automatically by eldev init.
/.eldev
/Eldev-local
result

View File

@ -21,6 +21,24 @@
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -39,24 +57,6 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1707689078,
@ -73,6 +73,24 @@
"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-stable": {
"locked": {
"lastModified": 1707650010,
@ -108,7 +126,7 @@
"root": {
"inputs": {
"emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils_2",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2"
}
},
@ -126,21 +144,6 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@ -25,17 +25,24 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs/442d407992384ed9c0e6d352de75b69079904e4e";
inputs.emacs-overlay.url = "github:nix-community/emacs-overlay/0f7f3b39157419f3035a2dad39fbaf8a4ba0448d";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
outputs = { self, nixpkgs, ... }@inputs:
inputs.flake-utils.lib.eachDefaultSystem (system:
outputs = { self, nixpkgs, flake-parts, ... }@inputs: flake-parts.lib.mkFlake { inherit inputs; } (
{
systems = [
"aarch64-darwin"
"riscv64-linux"
"riscv32-linux"
"x86_64-linux"
"x86_64-windows"
];
perSystem = { config, pkgs, system, ... }:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ inputs.emacs-overlay.overlays.package ];
};
emacs = pkgs.emacs29.override {
} // (pkgs.lib.optionalAttrs (pkgs.stdenv.isLinux) {
# Gtk causes a flickering issue on WM mode
@ -69,12 +76,12 @@
in {
packages.default = noether;
packages.${system}.default = noether;
devShells.default = pkgs.mkShell {
nativeBuildInputs = [ noether emacsPkgs test-noether ];
buildInputs = [ noether emacsPkgs ];
};
}
);
};
});
}