Nix-writers: Difference between revisions

imported>Samuela
Python3: `deps` doesn't work/exist. `libraries` is the correct key.
imported>Mic92
remove c writer
Line 14: Line 14:
pkgs.writers.writeBash "hello_world" ''
pkgs.writers.writeBash "hello_world" ''
   echo 'hello world!'
   echo 'hello world!'
''
</syntaxHighlight>
===C===
<syntaxHighlight lang=nix>
pkgs.writers.writeC "hello-world-ncurses" {
  libraries = [ pkgs.ncurses ];
} ''
  #include <ncurses.h>
  int main() {
    initscr();
    printw("Hello World !!!");
    refresh(); endwin();
    return 0;
  }
''
''
</syntaxHighlight>
</syntaxHighlight>