flake.nix: Avoid some anti-patterns
Even though nixpkgs.legacyPackages isn’t directly an anti-pattern, importing it allows passing non-default options.
This commit is contained in:
parent
b8735ee4f1
commit
66f534157d
|
@ -55,13 +55,13 @@
|
||||||
}@inputs: flake-utils.lib.eachDefaultSystem
|
}@inputs: flake-utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
checks = {
|
checks = {
|
||||||
pre-commit-check = nix-pre-commit-hooks.lib.${system}.run {
|
pre-commit-check = nix-pre-commit-hooks.lib.${system}.run {
|
||||||
src = ./.;
|
src = self;
|
||||||
hooks = {
|
hooks = {
|
||||||
black.enable = true;
|
black.enable = true;
|
||||||
nixpkgs-fmt.enable = true;
|
nixpkgs-fmt.enable = true;
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
};
|
};
|
||||||
source = lib.evalSource (lib.singleton {
|
source = lib.evalSource (lib.singleton {
|
||||||
config.file = {
|
config.file = {
|
||||||
path = toString ./.;
|
path = toString self;
|
||||||
useChecksum = true;
|
useChecksum = true;
|
||||||
filters = [
|
filters = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue