I've tried just about every type of setup I can find for a nix shell with python.
I don't want to purely use nixpkgs for a lack of some packages and broken packages. I'm trying to use pyside6, but not everything in pyside6 is provided by the package, e.g. tools like uic.
Attempting to use a venv as normal leads to a disconnect between the env and system with libstdc++.so.6 unable to be found. There are a various different flakes I've tried to use like the-nix-way/dev-templates#python and others from forum discussions which add stdenv.cc.cc.lib to no avail.
I think the farthest I've gotten is with poetry/poetry2nix, where auto-patchelf warns about missing libQt6 libraries. Running with nix run fails to 'find all the required dependencies' even when adding qt6.qtbase or qt6.full to the packages. This is that flake, taken from the poetry2nix github with an added devshell:
{
description = "Python application packaged using poetry2nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
poetry2nix.url = "github:nix-community/poetry2nix";
};
outputs = { self, nixpkgs, poetry2nix }:
let
system = "x86_64-linux"; # Adjust for your system
pkgs = nixpkgs.legacyPackages.${system};
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication;
in {
packages.${system}.default = mkPoetryApplication {
projectDir = ./.;
};
apps.${system}.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/app";
};
devShells.${system}.default = pkgs.mkShell {
packages = [ pkgs.poetry ];
buildInputs = [ pkgs.qt6.qtbase pkgs.qt6.full pkgs.qt6.wrapQtAppsHook ];
};
};
}
It seems kind of hopeless to get it working on NixOS. Does anyone have a working setup I could use for inspiration, or any other tips? I love the nix paradigm, but I'm honestly considering distrohopping with all of the trouble.
My main motivation is inclusion on my resume, and I'm left mulling over usernames instead of contributing! I also don't want to be too personally identifiable for whatever random thing I want to chime in on, so maybe bifurcating is a good solution.
Definitely feel like I'll end up in a similar spot and barely use the "official" one. I do see people with full names and all working on and sharing whatever they please, like through Lemmy. I just wish I had the nads to embrace it and not worry about connecting myself to bs memery. Damn social anxiety. Don't look at me!
I laughed at "adult friendly" but that's seriously apt.