Try using `.mkPoetryEnv` instead for devving (dont work yet..)

distribute_dis
Tyler Goodlet 2023-09-11 12:35:43 -04:00
parent 3b4a4db7b6
commit 261c331602
1 changed files with 47 additions and 45 deletions

View File

@ -6,6 +6,11 @@
# - then manually ensuring all deps are converted over: # - then manually ensuring all deps are converted over:
# - add this file to the repo and commit it # - add this file to the repo and commit it
# - # -
# GROKin tips:
# - CLI eps are (ostensibly) added via an `entry_points.txt`:
# - https://packaging.python.org/en/latest/specifications/entry-points/#file-format
# - https://github.com/nix-community/poetry2nix/blob/master/editable.nix#L49
{ {
description = "piker: trading gear for hackers (pkged with poetry2nix)"; description = "piker: trading gear for hackers (pkged with poetry2nix)";
@ -101,7 +106,7 @@
# won't be needed - thanks @k900: # won't be needed - thanks @k900:
# https://github.com/nix-community/poetry2nix/pull/1257 # https://github.com/nix-community/poetry2nix/pull/1257
pyqt5 = prev.pyqt5.override { pyqt5 = prev.pyqt5.override {
withWebkit = false; # withWebkit = false;
preferWheel = true; preferWheel = true;
}; };
@ -124,7 +129,8 @@
# WHY!? -> output-attrs that `nix develop` scans for: # WHY!? -> output-attrs that `nix develop` scans for:
# https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-develop.html#flake-output-attributes # https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-develop.html#flake-output-attributes
in { in
rec {
packages = { packages = {
# piker = poetry2nix.legacyPackages.x86_64-linux.mkPoetryEditablePackage { # piker = poetry2nix.legacyPackages.x86_64-linux.mkPoetryEditablePackage {
# editablePackageSources = { piker = ./piker; }; # editablePackageSources = { piker = ./piker; };
@ -143,36 +149,32 @@
}; };
}; };
devShells.default = pkgs.mkShell { # devShells.default = pkgs.mkShell {
# packages = [ poetry2nix.packages.${system}.poetry ]; # projectDir = projectDir;
packages = [ poetry2nix.packages.x86_64-linux.poetry ]; # python = "python3.10";
inputsFrom = [ self.packages.x86_64-linux.piker ]; # overrides = ahot_overrides;
# inputsFrom = [ self.packages.x86_64-linux.piker ];
# TODO: boot xonsh inside the poetry virtualenv when # packages = packages;
# defined via a custom entry point? # # packages = [ poetry2nix.packages.${system}.poetry ];
# NOTE XXX: apparently DON'T do these..? # };
# shellHook = "poetry run xonsh";
# shellHook = "poetry shell";
};
# TODO: grok the difference here.. # TODO: grok the difference here..
# - avoid re-cloning git repos on every develop entry.. # - avoid re-cloning git repos on every develop entry..
# - ideally allow hacking on the src code of some deps # - ideally allow hacking on the src code of some deps
# (tractor, pyqtgraph, tomlkit, etc.) WITHOUT having to # (tractor, pyqtgraph, tomlkit, etc.) WITHOUT having to
# re-install them every time a change is made. # re-install them every time a change is made.
# - boot a usable xonsh inside the poetry virtualenv when
# devShells.default = (p2npkgs.mkPoetryEnv { # defined via a custom entry point?
# # let { devShells.default = p2npkgs.mkPoetryEnv {
# # devEnv = p2npkgs.mkPoetryEnv { # env = p2npkgs.mkPoetryEnv {
# projectDir = projectDir; projectDir = projectDir;
# overrides = ahot_overrides; python = pkgs.python310;
# inputsFrom = [ self.packages.x86_64-linux.piker ]; overrides = ahot_overrides;
# }).env.overrideAttrs (old: { editablePackageSources = packages;
# buildInputs = [ packages.piker ]; # piker = "./";
# } # tractor = "../tractor/";
# ); # }; # wut?
};
} }
); # end of .outputs scope ); # end of .outputs scope
} }