{ description = "A Nix-flake-based Python development environment for the Fagos Discord bot"; inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; outputs = inputs: let supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f { pkgs = import inputs.nixpkgs { inherit system; }; }); version = "3.13"; in { # Development shell for `nix develop` devShells = forEachSupportedSystem ({ pkgs }: let concatMajorMinor = v: pkgs.lib.pipe v [ pkgs.lib.versions.splitVersion (pkgs.lib.sublist 0 2) pkgs.lib.concatStrings ]; python = pkgs."python${concatMajorMinor version}"; in { default = pkgs.mkShell { venvDir = ".venv"; postShellHook = '' venvVersionWarn() { local venvVersion venvVersion="$("$venvDir/bin/python" -c 'import platform; print(platform.python_version())')" [[ "$venvVersion" == "${python.version}" ]] && return cat <