Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example usage with requirements-dev.txt #530

Open
edmundmiller opened this issue Dec 11, 2022 · 2 comments
Open

Example usage with requirements-dev.txt #530

edmundmiller opened this issue Dec 11, 2022 · 2 comments

Comments

@edmundmiller
Copy link

Hello, I'm trying to use mach-nix to add a flake for this package https://github.com/nf-core/tools

The problem is, they use a requirements-dev.txt. How should both the requirements.txt and requirements-dev.txt be included in the nix environment?

@bjornfor
Copy link
Contributor

How about this (untested):

  mach-nix.mkPython {
    ...
    requirements = ''
      ${builtins.readFile "${src}/requirements.txt"}
      ${builtins.readFile "${src}/requirements-dev.txt"}
    '';
  };
```.

@edmundmiller
Copy link
Author

I came up with

          requirements = ''
            ${builtins.readFile ./requirements.txt}
            ${builtins.readFile ./requirements-dev.txt}
            python-lsp-server
            rich-click
            black
          '';

But I still can't do nix develop and then pytest, just checking that that's a good workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants