diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/flake.nix b/flake.nix index c72a6fc..ed8d121 100644 --- a/flake.nix +++ b/flake.nix @@ -5,32 +5,36 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; - outputs = { self, nixpkgs }: - let - systems = [ "x86_64-darwin" "aarch64-darwin" "x86_64-linux" ]; - createDevShell = system: - let - pkgs = import nixpkgs { system = "${system}"; config.allowUnfree = true; }; - my-python = pkgs.python3; - python-with-my-packages = my-python.withPackages (p: with p; [ - selenium - python-dotenv - ]); - in - pkgs.mkShell { - buildInputs = [ - python-with-my-packages + outputs = { + self, + nixpkgs, + }: let + systems = ["x86_64-darwin" "aarch64-darwin" "x86_64-linux"]; + createDevShell = system: let + pkgs = import nixpkgs { + system = "${system}"; + config.allowUnfree = true; + }; + in + pkgs.mkShell { + buildInputs = [ + (pkgs.python3.withPackages (p: + with p; [ + selenium + python-dotenv + ])) - # Chrome driver and google-chrome dependencies - pkgs.chromedriver - pkgs.google-chrome + pkgs.black - # Create a script to run google-chrome-stable - (pkgs.writeShellScriptBin "google-chrome" "exec -a $0 ${pkgs.google-chrome}/bin/google-chrome-stable $@") - ]; - }; - in - { - devShell = nixpkgs.lib.genAttrs systems createDevShell; - }; + # Chrome driver and google-chrome dependencies + pkgs.chromedriver + pkgs.google-chrome + + # Create a script to run google-chrome-stable + (pkgs.writeShellScriptBin "google-chrome" "exec -a $0 ${pkgs.google-chrome}/bin/google-chrome-stable $@") + ]; + }; + in { + devShell = nixpkgs.lib.genAttrs systems createDevShell; + }; } |