2022-06-26 22:10:57 -04:00
|
|
|
{
|
|
|
|
description = "Python pip flake";
|
|
|
|
|
2022-07-11 17:43:09 -04:00
|
|
|
inputs.mach-nix.url = "github:DavHau/mach-nix/3.5.0";
|
2022-06-26 22:10:57 -04:00
|
|
|
|
2022-06-27 16:41:29 -04:00
|
|
|
outputs = { self, nixpkgs, mach-nix }@inp:
|
|
|
|
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 17:43:09 -04:00
|
|
|
in rec {
|
|
|
|
defaultApp = forAllSystems (system: pkgs:
|
|
|
|
mach-nix.lib."${system}".mkPython {
|
2022-06-27 16:41:29 -04:00
|
|
|
requirements = builtins.readFile ./requirements.txt;
|
|
|
|
});
|
2022-07-11 17:43:09 -04:00
|
|
|
devShell = forAllSystems (system: pkgs:
|
|
|
|
pkgs.mkShell { buildInputs = [ defaultApp."${system}" ]; });
|
2022-06-27 16:41:29 -04:00
|
|
|
};
|
2022-06-26 22:10:57 -04:00
|
|
|
}
|