From 50665737e2f6e4e614b034a5eb87000c75748dbd Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 11 Jul 2022 17:43:09 -0400 Subject: [PATCH] change python template to allow more programs --- templates/python/flake.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/python/flake.nix b/templates/python/flake.nix index ef6b771..3e4e7cf 100644 --- a/templates/python/flake.nix +++ b/templates/python/flake.nix @@ -1,7 +1,7 @@ { 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: let @@ -9,10 +9,12 @@ forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system (import nixpkgs { inherit system; })); - in { - devShell = forAllSystems (system: pkgs: - mach-nix.lib."${system}".mkPythonShell { + in rec { + defaultApp = forAllSystems (system: pkgs: + mach-nix.lib."${system}".mkPython { requirements = builtins.readFile ./requirements.txt; }); + devShell = forAllSystems (system: pkgs: + pkgs.mkShell { buildInputs = [ defaultApp."${system}" ]; }); }; }