2023-06-10 20:59:51 +00:00
|
|
|
{
|
|
|
|
description = "intake feed sources";
|
|
|
|
|
2023-06-20 17:44:05 +00:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/23.05";
|
2023-06-10 20:59:51 +00:00
|
|
|
|
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
in {
|
2023-06-20 18:46:41 +00:00
|
|
|
packages.${system} = let
|
|
|
|
pkgs = (import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [ self.overlays.default ];
|
|
|
|
});
|
|
|
|
in {
|
|
|
|
default = pkgs.intakeSources;
|
|
|
|
inherit (pkgs) intake-rss intake-reddit intake-hackernews;
|
2023-06-11 00:01:20 +00:00
|
|
|
};
|
|
|
|
|
2023-06-10 20:59:51 +00:00
|
|
|
devShells.${system} = {
|
2023-06-12 03:55:27 +00:00
|
|
|
python = let
|
2023-06-20 18:46:41 +00:00
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2023-06-10 20:59:51 +00:00
|
|
|
pythonEnv = pkgs.python38.withPackages (pypkgs: with pypkgs; [ black feedparser ]);
|
|
|
|
in pkgs.mkShell {
|
|
|
|
packages = [ pythonEnv ];
|
|
|
|
shellHook = ''
|
2023-06-12 03:55:27 +00:00
|
|
|
PS1="(python) $PS1"
|
2023-06-10 20:59:51 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-06-20 18:46:41 +00:00
|
|
|
|
|
|
|
overlays.default = final: prev: let
|
|
|
|
pythonPackage = name: path: deps: final.python38Packages.buildPythonPackage {
|
|
|
|
inherit name;
|
|
|
|
src = builtins.path { inherit name path; };
|
|
|
|
format = "pyproject";
|
|
|
|
propagatedBuildInputs = [ final.python38Packages.setuptools ] ++ deps;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
intakeSources = final.symlinkJoin {
|
|
|
|
name = "intake-sources";
|
|
|
|
paths = [
|
|
|
|
final.intake-rss
|
|
|
|
final.intake-reddit
|
|
|
|
final.intake-hackernews
|
|
|
|
];
|
|
|
|
};
|
|
|
|
intake-rss = pythonPackage "intake-rss" ./intake-rss [ final.python38Packages.feedparser ];
|
|
|
|
intake-reddit = pythonPackage "intake-reddit" ./intake-reddit [];
|
|
|
|
intake-hackernews = pythonPackage "intake-hackernews" ./intake-hackernews [];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosModules.default = {
|
|
|
|
nixpkgs.overlays = [ self.overlays.default ];
|
|
|
|
};
|
2023-06-10 20:59:51 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|