From 47bcecb5fce46c5cfc0c99524f938301c3e9baa1 Mon Sep 17 00:00:00 2001 From: Amadej Kastelic Date: Fri, 23 Aug 2024 09:36:18 +0200 Subject: [PATCH] Fix nix shell (#7) --- Makefile | 6 ++++++ shell.nix | 21 +++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0355adc --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +lint: + python -m flake8 **/*.py +format: + python -m black **/*.py +nix-env: + @nix-shell --command 'source "$$(pipenv --venv)/bin/activate"; return' \ No newline at end of file diff --git a/shell.nix b/shell.nix index 460bf67..e8c72ea 100644 --- a/shell.nix +++ b/shell.nix @@ -1,9 +1,22 @@ -{pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11") {}}: -pkgs.mkShellNoCC { +{pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable") {}}: +pkgs.mkShell { + LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; + packages = with pkgs; [ - python3 + python312 + python312Packages.pip + python312Packages.python-magic + playwright + playwright-driver.browsers + docker-compose pipenv curl jq + file ]; -} + + shellHook = '' + export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers} + export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true + ''; +} \ No newline at end of file