A collection "How do I ..." cookbook style recipes
Nobody has claimed this yet.
- Dominant language
- Nix
- Stars
- 4k
- Forks
- 339
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 7
Description
For the task I am currently working on I really need to install https://github.com/aurora/rmate on my NixOS server. It's a simple bash script so I can just wget and chmod +x it, but that feels icky. I want to have it in my configuration.nix so I can use it in the future too.
After considerable Googling I didn't find a tutorial on how to "package a bash script from the Internet". Here it is, this is what you dump into configuration.nix:
{ config, pkgs, ... }:
let
rmate_src = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/aurora/rmate/master/rmate";
sha256 = "152z31xhdq9w0mn9ibv9jsnc2k1p36yr23waa6376d8m05hpmaln";
executable = true;
};
rmate = pkgs.writeShellScriptBin "rmate" ''${rmate_src} "$@"'';
in
{
...
environment.systemPackages = [ rmate ];
}
It would be nice if nix.dev had a section where we could collect quick recipes like this one.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the rmate packaging example in the issue as the starting material, then determine where a cookbook section belongs in the documentation. Done means adding a reviewed, usable recipe for packaging a downloaded Bash script and making it easy to find alongside similar quick recipes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100