change python template to allow more programs

This commit is contained in:
Noah Masur 2022-07-11 17:43:09 -04:00
parent 92e2eac11e
commit 50665737e2

View File

@ -1,7 +1,7 @@
{ {
description = "Python pip flake"; description = "Python pip flake";
inputs.mach-nix.url = "github:mach-nix/3.5.0"; inputs.mach-nix.url = "github:DavHau/mach-nix/3.5.0";
outputs = { self, nixpkgs, mach-nix }@inp: outputs = { self, nixpkgs, mach-nix }@inp:
let let
@ -9,10 +9,12 @@
forAllSystems = f: forAllSystems = f:
nixpkgs.lib.genAttrs supportedSystems nixpkgs.lib.genAttrs supportedSystems
(system: f system (import nixpkgs { inherit system; })); (system: f system (import nixpkgs { inherit system; }));
in { in rec {
devShell = forAllSystems (system: pkgs: defaultApp = forAllSystems (system: pkgs:
mach-nix.lib."${system}".mkPythonShell { mach-nix.lib."${system}".mkPython {
requirements = builtins.readFile ./requirements.txt; requirements = builtins.readFile ./requirements.txt;
}); });
devShell = forAllSystems (system: pkgs:
pkgs.mkShell { buildInputs = [ defaultApp."${system}" ]; });
}; };
} }