From f08af933cc9c231a8865316d4ab8bccb5be9f92f Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Tue, 20 Jun 2023 20:38:35 +0000 Subject: [PATCH] Add overlay --- flake.nix | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index ebe967b..42e2ccb 100644 --- a/flake.nix +++ b/flake.nix @@ -17,20 +17,20 @@ let inherit (nixpkgs.lib) makeOverridable nixosSystem; system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; in { - packages.${system} = { + packages.${system} = let + pkgs = (import nixpkgs { + inherit system; + overlays = [ self.overlays.default ]; + }); + in { default = self.packages.${system}.intake; - intake = pkgs.python38Packages.buildPythonPackage { - name = "intake"; - src = builtins.path { path = ./.; name = "intake"; }; - format = "pyproject"; - propagatedBuildInputs = with pkgs.python38Packages; [ flask setuptools ]; - }; + inherit (pkgs) intake; }; devShells.${system} = { default = let + pkgs = nixpkgs.legacyPackages.${system}; pythonEnv = pkgs.python38.withPackages (pypkgs: with pypkgs; [ flask black pytest ]); in pkgs.mkShell { packages = [ @@ -45,6 +45,15 @@ }; }; + overlays.default = final: prev: { + intake = final.python38Packages.buildPythonPackage { + name = "intake"; + src = builtins.path { path = ./.; name = "intake"; }; + format = "pyproject"; + propagatedBuildInputs = with final.python38Packages; [ flask setuptools ]; + }; + }; + templates.source = { path = builtins.path { path = ./template; name = "source"; }; description = "A basic intake source config";