123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- {
- inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
- inputs.poetry2nix.url = "github:nix-community/poetry2nix";
- outputs = { self, nixpkgs, poetry2nix }:
- let
- supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
- forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
- pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
- overrideFun = pyfinal: pyprev: {
- pyside6 = pyfinal.pkgs.python3.pkgs.pyside6;
- shiboken6 = pyfinal.pkgs.python3.pkgs.shiboken6;
- pyqt6 = pyfinal.pkgs.python3.pkgs.pyqt6;
- pyqt6-sip = pyfinal.pkgs.python3.pkgs.pyqt6-sip;
- dbus-python = pyfinal.pkgs.python3.pkgs.dbus-python;
- };
- in
- {
- packages = forAllSystems (system: let
- inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryApplication overrides;
- in {
- default = mkPoetryApplication {
- projectDir = self;
- overrides = overrides.withDefaults overrideFun;
- };
- });
- devShells = forAllSystems (system: let
- inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryEnv overrides;
- in {
- default = pkgs.${system}.mkShellNoCC {
- packages = with pkgs.${system}; [
- (mkPoetryEnv {
- projectDir = self;
- extraPackages = ps: [ ps.black ps.pyside6 ps.dbus-python ];
- overrides = overrides.withDefaults overrideFun;
- })
- poetry
- mypy
- ];
- };
- });
- };
- }
|