50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
description = "Development environment for jbackup";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
systems.url = "github:nix-systems/default";
|
|
flake-utils = {
|
|
url = "github:numtide/flake-utils";
|
|
inputs.systems.follows = "systems";
|
|
};
|
|
};
|
|
|
|
outputs = { nixpkgs, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in with pkgs; rec {
|
|
devShell = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
(python3.withPackages (ps: [
|
|
ps.requests
|
|
ps.beautifulsoup4
|
|
ps.lxml
|
|
ps."youtube-transcript-api"
|
|
ps.pytube
|
|
ps.playwright
|
|
ps.markdown
|
|
ps."python-dotenv"
|
|
ps.pydantic
|
|
ps."python-dateutil"
|
|
]))
|
|
playwright-driver.browsers
|
|
];
|
|
|
|
shellHook = ''
|
|
if [ -f .env ]; then
|
|
set -a
|
|
. ./.env
|
|
set +a
|
|
fi
|
|
|
|
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
|
|
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
|
|
export PLAYWRIGHT_HOST_PLATFORM_OVERRIDE="ubuntu-24.04"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|