cm0002@europe.pub to Linux@programming.dev · 2 days agoThe security situation with the Arch Linux AUR got a lot worsewww.gamingonlinux.comexternal-linkmessage-square41linkfedilinkarrow-up1173arrow-down15cross-posted to: linux@lemmy.ml
arrow-up1168arrow-down1external-linkThe security situation with the Arch Linux AUR got a lot worsewww.gamingonlinux.comcm0002@europe.pub to Linux@programming.dev · 2 days agomessage-square41linkfedilinkcross-posted to: linux@lemmy.ml
minus-squareultimate_worrier@lemmy.dbzer0.comlinkfedilinkarrow-up1·15 hours agoHere’s an example dev environment for a web scraper provisioned in a flake: { description = "Generic Web Scraper"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs?ref=nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, utils }: utils.lib.eachSystem ["x86_64-linux"] (system: let pkgs = import nixpkgs { system = system; }; in rec { packages = { pythonEnv = pkgs.python3.withPackages (ps: with ps; [ webdriver-manager openpyxl pandas requests beautifulsoup4 websocket-client selenium keyboard ]); }; devShell = pkgs.mkShell { buildInputs = [ pkgs.chromium pkgs.undetected-chromedriver packages.pythonEnv ]; shellHook = '' export PATH=${pkgs.chromium}/bin:${pkgs.undetected-chromedriver}/bin:$PATH ''; }; }); } Not sure if it’s helpful but each Pypi package needs to be declared in that array. There are other ways to do it but this is an example I had laying around.
Here’s an example dev environment for a web scraper provisioned in a flake:
{ description = "Generic Web Scraper"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs?ref=nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, utils }: utils.lib.eachSystem ["x86_64-linux"] (system: let pkgs = import nixpkgs { system = system; }; in rec { packages = { pythonEnv = pkgs.python3.withPackages (ps: with ps; [ webdriver-manager openpyxl pandas requests beautifulsoup4 websocket-client selenium keyboard ]); }; devShell = pkgs.mkShell { buildInputs = [ pkgs.chromium pkgs.undetected-chromedriver packages.pythonEnv ]; shellHook = '' export PATH=${pkgs.chromium}/bin:${pkgs.undetected-chromedriver}/bin:$PATH ''; }; }); }Not sure if it’s helpful but each Pypi package needs to be declared in that array. There are other ways to do it but this is an example I had laying around.