ncbi / sra-tools

SRA Tools
Other
1.07k stars 243 forks source link

consider adding a flake.nix #854

Open MatrixManAtYrService opened 9 months ago

MatrixManAtYrService commented 9 months ago

Hello,

While packaging sra-tools for use in a Jupyter notebook, I ended up writing a flake.nix for it. Nix users can now do this:

$ nix build github:MatrixManAtYrService/sra-tools
$ ./result/bin/fastq-dump

...and they'll have run fastq-dump as it appears in this project (well, in my fork of it anyway).

This scratches my itch just fine. My users know me and are unlikely to be bothered by the question:

Who is this MatrixManAtYrService guy and why should I use his fork?

But it wouldn't be much work to support nix used in this way:

$ nix build github:ncbi/sra-tools  # builds the tools and puts them in ./results

You'd just need to take these commits:

...and run nix flake update whenever you make a release. This will pin the dependency versions (cmake, etc...) to whatever they were at the time you ran that command.

I'll totally understand if you don't care to take on the maintenance burden, but I thought I'd mention the possibility in case it helps other users access these tools more easily.