From 56fa874cc85edebd243e401d13de3c7f909c0f4d Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 10 Jun 2023 13:59:51 -0700 Subject: [PATCH] Add flake and dev shell --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..eecf92d --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1669833724, + "narHash": "sha256-/HEZNyGbnQecrgJnfE8d0WC5c1xuPSD2LUpB6YXlg4c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4d2b37a84fad1091b9de401eb450aae66f1a741e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5b60849 --- /dev/null +++ b/flake.nix @@ -0,0 +1,23 @@ +{ + description = "intake feed sources"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/22.11"; + + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShells.${system} = { + intake-rss = let + pythonEnv = pkgs.python38.withPackages (pypkgs: with pypkgs; [ black feedparser ]); + in pkgs.mkShell { + packages = [ pythonEnv ]; + shellHook = '' + PS1="(intake-rss) $PS1" + ''; + }; + }; + }; +} +