Add overlay

This commit is contained in:
Tim Van Baak 2023-06-20 20:38:35 +00:00
parent 760781d6d9
commit f08af933cc
1 changed files with 17 additions and 8 deletions

View File

@ -17,20 +17,20 @@
let let
inherit (nixpkgs.lib) makeOverridable nixosSystem; inherit (nixpkgs.lib) makeOverridable nixosSystem;
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in { in {
packages.${system} = { packages.${system} = let
pkgs = (import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
});
in {
default = self.packages.${system}.intake; default = self.packages.${system}.intake;
intake = pkgs.python38Packages.buildPythonPackage { inherit (pkgs) intake;
name = "intake";
src = builtins.path { path = ./.; name = "intake"; };
format = "pyproject";
propagatedBuildInputs = with pkgs.python38Packages; [ flask setuptools ];
};
}; };
devShells.${system} = { devShells.${system} = {
default = let default = let
pkgs = nixpkgs.legacyPackages.${system};
pythonEnv = pkgs.python38.withPackages (pypkgs: with pypkgs; [ flask black pytest ]); pythonEnv = pkgs.python38.withPackages (pypkgs: with pypkgs; [ flask black pytest ]);
in pkgs.mkShell { in pkgs.mkShell {
packages = [ 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 = { templates.source = {
path = builtins.path { path = ./template; name = "source"; }; path = builtins.path { path = ./template; name = "source"; };
description = "A basic intake source config"; description = "A basic intake source config";