diff options
author | jeschli <jeschli@gmail.com> | 2018-10-27 12:37:26 +0200 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-10-27 12:37:26 +0200 |
commit | 582dceee4db7a13cf73216c9e85276c126fe34ff (patch) | |
tree | 9420fd0bc86437ca06c243050526677c698380ac | |
parent | 0660cc1a1169e799bda356c6fadb245a96345816 (diff) |
Add introduction
-rw-r--r-- | pkgs/default.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index ea3421b..a56042c 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,5 +1,24 @@ with import ../lib; +/* Collection of nix-writers. + * + * Purpose: Use your favourite language to generate + * an executable and package it in nix. + * + * How to use it: Every nix-writer has the form: + * writeLang "Name-of-exec" '' + * source code in <Lang> + * '' + * + * If the source code compiles in <Lang>, + * nix will generate an executable /nix/store/<SHA>-<Name-of-exec> + * + * Getting started: + * + * Switch into the example directory and call + * nix-build hello_world.nix. + */ + pkgs: oldpkgs: { exec = name: { filename, argv ? null, envp ? null, destination ? "" }: pkgs.writeC name { inherit destination; } /* c */ '' |