dotfiles/templates/python/flake.nix

21 lines
658 B
Nix
Raw Normal View History

{
description = "Python pip flake";
inputs.mach-nix.url = "github:DavHau/mach-nix/3.5.0";
2023-02-21 01:45:56 +00:00
outputs = { 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; }));
in rec {
2023-02-21 01:45:56 +00:00
defaultApp = forAllSystems (system: _pkgs:
mach-nix.lib."${system}".mkPython {
2022-06-27 20:41:29 +00:00
requirements = builtins.readFile ./requirements.txt;
});
devShell = forAllSystems (system: pkgs:
pkgs.mkShell { buildInputs = [ defaultApp."${system}" ]; });
2022-06-27 20:41:29 +00:00
};
}