From 9030f0f8c50259b09e15e1ce0e68db325aeb621d Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 24 Sep 2021 22:12:56 -0500 Subject: [PATCH] Move devShell from flake.nix to separate shell.nix Again, to facilitate non-flake development. --- flake.nix | 17 +++-------------- shell.nix | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 shell.nix diff --git a/flake.nix b/flake.nix index 8c290d8..5ba3877 100644 --- a/flake.nix +++ b/flake.nix @@ -8,11 +8,10 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; + drvArgs = { srcDir = self; }; in rec { - packages.nix-eval-jobs = pkgs.callPackage ./default.nix { - srcDir = self; - }; + packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs; checks = { @@ -30,17 +29,7 @@ }; defaultPackage = self.packages.${system}.nix-eval-jobs; - devShell = defaultPackage.overrideAttrs (old: { + devShell = pkgs.callPackage ./shell.nix drvArgs; - nativeBuildInputs = old.nativeBuildInputs ++ [ - - pkgs.editorconfig-checker - - (pkgs.python3.withPackages(ps: [ - ps.pytest - ])) - - ]; - }); }); } diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..736a1c3 --- /dev/null +++ b/shell.nix @@ -0,0 +1,17 @@ +{ pkgs ? import { } +, srcDir ? null +}: + +(pkgs.callPackage ./default.nix { inherit srcDir; }).overrideAttrs(old: { + + nativeBuildInputs = old.nativeBuildInputs ++ [ + + pkgs.editorconfig-checker + + (pkgs.python3.withPackages(ps: [ + ps.pytest + ])) + + ]; + +})