2022-06-27 02:10:57 +00:00
|
|
|
{
|
|
|
|
description = "Python pip flake";
|
|
|
|
|
2023-07-31 17:50:44 +00:00
|
|
|
inputs.pypi-deps-db = {
|
|
|
|
url = "github:DavHau/pypi-deps-db/b8c61fb930c9a9f95057b717bc7c701196f2ee4e";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
inputs.mach-nix = {
|
|
|
|
# url = "github:DavHau/mach-nix/3.5.0";
|
|
|
|
url = "github:DavHau/mach-nix/8d903072c7b5426d90bc42a008242c76590af916";
|
|
|
|
inputs.pypi-deps-db.follows = "pypi-deps-db";
|
|
|
|
};
|
2022-06-27 02:10:57 +00:00
|
|
|
|
2023-11-02 02:13:49 +00:00
|
|
|
outputs = { self, nixpkgs, mach-nix }:
|
2022-06-27 20:41:29 +00:00
|
|
|
let
|
|
|
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
|
|
|
forAllSystems = f:
|
|
|
|
nixpkgs.lib.genAttrs supportedSystems
|
|
|
|
(system: f system (import nixpkgs { inherit system; }));
|
2022-07-11 21:43:09 +00:00
|
|
|
in rec {
|
2023-02-21 01:45:56 +00:00
|
|
|
defaultApp = forAllSystems (system: _pkgs:
|
2022-07-11 21:43:09 +00:00
|
|
|
mach-nix.lib."${system}".mkPython {
|
2022-06-27 20:41:29 +00:00
|
|
|
requirements = builtins.readFile ./requirements.txt;
|
|
|
|
});
|
2022-07-11 21:43:09 +00:00
|
|
|
devShell = forAllSystems (system: pkgs:
|
|
|
|
pkgs.mkShell { buildInputs = [ defaultApp."${system}" ]; });
|
2022-06-27 20:41:29 +00:00
|
|
|
};
|
2022-06-27 02:10:57 +00:00
|
|
|
}
|