Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created December 3, 2017 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infinisil/0b4cecd97d0818cec62674272d0d3e71 to your computer and use it in GitHub Desktop.
Save infinisil/0b4cecd97d0818cec62674272d0d3e71 to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
let
mkAlias = name: command: writeScriptBin name ''
#!${bash}/bin/bash
${command} "$@"
'';
aliases = {
sayhi = "${hello}/bin/hello";
foobar = "${gcc}/bin/gcc --version";
};
aliaspkgs = builtins.attrValues (lib.mapAttrs mkAlias aliases);
in
[
aliaspkgs
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment