clean up nix tooling

This commit is contained in:
raf 2023-10-10 10:04:52 +03:00
parent 553d5251ca
commit ddab9f6068
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
2 changed files with 16 additions and 10 deletions

View file

@ -11,12 +11,14 @@
pkgsForEach = nixpkgs.legacyPackages;
in {
packages = forEachSystem (system: {
default = pkgsForEach.${system}.callPackage ./default.nix {};
default = self.packages.${system}.projectile-simulation;
projectile-simulation = pkgsForEach.${system}.callPackage ./default.nix {};
});
devShells = forEachSystem (system: {
devShells = {
default = pkgsForEach.${system}.callPackage ./shell.nix {};
default = self.devShells.${system}.python-shell;
python-shell = pkgsForEach.${system}.callPackage ./shell.nix {};
};
});
};

View file

@ -1,9 +1,13 @@
{pkgs, ...}: let
my-python-packages = ps:
with ps; [
matplotlib
numpy
];
my-python = pkgs.python3.withPackages my-python-packages;
{
callPackage,
mkShellNoCC,
python3,
...
}: let
defaultPackage = callPackage ./default.nix;
in
my-python.env
mkShellNoCC {
packages = [
(python3.withPackages defaultPackage.propagatedBuildInputs)
];
}