Digitale bierlijst

flake.nix 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {
  2. inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  3. inputs.poetry2nix.url = "github:nix-community/poetry2nix";
  4. outputs = { self, nixpkgs, poetry2nix }:
  5. let
  6. supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
  7. forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
  8. pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
  9. overrideFun = pyfinal: pyprev: {
  10. pyside6 = pyfinal.pkgs.python3.pkgs.pyside6;
  11. shiboken6 = pyfinal.pkgs.python3.pkgs.shiboken6;
  12. pyqt6 = pyfinal.pkgs.python3.pkgs.pyqt6;
  13. pyqt6-sip = pyfinal.pkgs.python3.pkgs.pyqt6-sip;
  14. dbus-python = pyfinal.pkgs.python3.pkgs.dbus-python;
  15. };
  16. in
  17. {
  18. packages = forAllSystems (system: let
  19. inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryApplication overrides;
  20. in {
  21. default = mkPoetryApplication {
  22. projectDir = self;
  23. overrides = overrides.withDefaults overrideFun;
  24. };
  25. });
  26. devShells = forAllSystems (system: let
  27. inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryEnv overrides;
  28. in {
  29. default = pkgs.${system}.mkShellNoCC {
  30. packages = with pkgs.${system}; [
  31. (mkPoetryEnv {
  32. projectDir = self;
  33. extraPackages = ps: [ ps.black ps.pyside6 ps.dbus-python ];
  34. overrides = overrides.withDefaults overrideFun;
  35. })
  36. poetry
  37. mypy
  38. ];
  39. };
  40. });
  41. };
  42. }