question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to replace old nixpkgs with mach-nix.mkPython

See original GitHub issue

Hi, some python nixpkgs is old. I’m trying to use mach-nix to install that package from official registries (like pip) instead.

what I tried so far:

    (python3.withPackages (ps: with ps; [
      (mach-nix.mkPython {
        requirements = ''
          pynvim
          python-lsp-black
          python-lsp-server
          pylsp-mypy
        '';
      })
    ]))

but I don’t get the pylsp binary installed. This code is working:

    (python3.withPackages (ps: with ps; [
          pynvim
          python-lsp-black
          python-lsp-server
          pylsp-mypy
    ]))

but of course the version is older.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sandangelcommented, Jul 22, 2022

not neccessary, just the pkgs.python3 from nixpkgs need to be aware of python packages from mach-nix. or if mach-nix also installing python, I need to configure neovim to point to that python.

0reactions
bjornforcommented, Jul 26, 2022

I got /nix/store/10nbcgpi5vgbadacrd1b8aw0gfgpk293-python3-3.10.5/bin/python, but I want to have something like "${customPython.pkgs}/bin/python" in my nvim config instead of hard coding.

"${customPython.pkgs}/bin/python" -> "${import ./your-mach-nix-python-file.nix}/bin/python"?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python - NixOS Wiki
We saw above how to install Python packages using nixpkgs. Since these are written by hand by nixpkgs maintainers, it isn't uncommon for...
Read more >
Mach-nix: Create python environments quick and easy
I'd like to have tensorflow with the usual nix features enabled like SSE/AVX/FMA which I cannot get from pypi. Therefore i must take...
Read more >
How to specify (newer) version of Python packages? : r/Nix
In this case it sounds like you simply want to change the input dependency. There's an example in the nixpkgs repo for an...
Read more >
Awesome Nix
Arduino; Crystal; Elm; Haskell; Node.js; PHP; PureScript; Python; Ruby; Rust; Scala. NixOS Modules; NixOS Configuration Editors; Overlays; Community ...
Read more >
Installing a buildPythonPackage Nix package into a mach-nix ...
I am using a Nix flake to define a devShell with a python environment and certain dependencies available in it. This environment consists...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found