Move devShell from flake.nix to separate shell.nix

Again, to facilitate non-flake development.
This commit is contained in:
adisbladis 2021-09-24 22:12:56 -05:00
parent 7550bb8cc1
commit 9030f0f8c5
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
2 changed files with 20 additions and 14 deletions

View file

@ -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
]))
];
});
});
}

17
shell.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs ? import <nixpkgs> { }
, srcDir ? null
}:
(pkgs.callPackage ./default.nix { inherit srcDir; }).overrideAttrs(old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
pkgs.editorconfig-checker
(pkgs.python3.withPackages(ps: [
ps.pytest
]))
];
})