From 66f534157d19b716d0af79cb86c1cc032ae82453 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 7 Nov 2021 20:31:48 +0100 Subject: [PATCH] flake.nix: Avoid some anti-patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even though nixpkgs.legacyPackages isn’t directly an anti-pattern, importing it allows passing non-default options. --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 1fae5b5..de03f54 100644 --- a/flake.nix +++ b/flake.nix @@ -55,13 +55,13 @@ }@inputs: flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib; in { checks = { pre-commit-check = nix-pre-commit-hooks.lib.${system}.run { - src = ./.; + src = self; hooks = { black.enable = true; nixpkgs-fmt.enable = true; @@ -88,7 +88,7 @@ }; source = lib.evalSource (lib.singleton { config.file = { - path = toString ./.; + path = toString self; useChecksum = true; filters = [ {