From 8ed3b85cade9873d7763356d0aba1c9d5a616177 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 29 May 2023 13:46:19 -0700 Subject: [PATCH] Add flask to build deps and add some dev deps to shell --- default.nix | 6 ++++-- shell.nix | 14 +++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/default.nix b/default.nix index 3e51f46..f4d5739 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,6 @@ -{ pkgs ? import {} }: +{ pkgs ? import {}, + extraDeps ? [] +}: let pypkgs = pkgs.python38Packages; @@ -6,5 +8,5 @@ in pypkgs.buildPythonPackage { name = "intake"; src = builtins.path { path = ./.; name = "intake"; }; format = "pyproject"; - propagatedBuildInputs = with pypkgs; [ setuptools ]; + propagatedBuildInputs = with pypkgs; [ flask setuptools ] ++ extraDeps; } diff --git a/shell.nix b/shell.nix index 3a1f595..757aabc 100644 --- a/shell.nix +++ b/shell.nix @@ -1,8 +1,12 @@ { pkgs ? import {} }: let - intake = import ./default.nix {}; -in pkgs.mkShell { - inputsFrom = [ intake ]; - buildInputs = [ pkgs.nixos-shell ]; -} + extraDeps = [ + pkgs.nixos-shell + pkgs.python38Packages.black + pkgs.python38Packages.pytest + ]; + intake = import ./default.nix { + inherit pkgs extraDeps; + }; +in intake