diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/writers/default.nix')
-rw-r--r-- | nixpkgs/pkgs/build-support/writers/default.nix | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/nixpkgs/pkgs/build-support/writers/default.nix b/nixpkgs/pkgs/build-support/writers/default.nix index 47919c251af1..111ec68a6021 100644 --- a/nixpkgs/pkgs/build-support/writers/default.nix +++ b/nixpkgs/pkgs/build-support/writers/default.nix @@ -99,51 +99,6 @@ rec { writeBashBin = name: writeBash "/bin/${name}"; - # writeC writes an executable c package called `name` to `destination` using `libraries`. - # - # Examples: - # writeC "hello-world-ncurses" { libraries = [ pkgs.ncurses ]; } '' - # #include <ncurses.h> - # int main() { - # initscr(); - # printw("Hello World !!!"); - # refresh(); endwin(); - # return 0; - # } - # '' - writeC = name: { - libraries ? [], - strip ? true - }: - makeBinWriter { - compileScript = '' - PATH=${makeBinPath [ - pkgs.binutils-unwrapped - pkgs.coreutils - pkgs.findutils - pkgs.gcc - pkgs.pkg-config - ]} - export PKG_CONFIG_PATH=${concatMapStringsSep ":" (pkg: "${pkg}/lib/pkgconfig") libraries} - gcc \ - ${optionalString (libraries != []) - "$(pkg-config --cflags --libs ${ - concatMapStringsSep " " (pkg: "$(find ${escapeShellArg pkg}/lib/pkgconfig -name \\*.pc)") libraries - })" - } \ - -O \ - -o "$out" \ - -Wall \ - -x c \ - "$contentPath" - ''; - inherit strip; - } name; - - # writeCBin takes the same arguments as writeC but outputs a directory (like writeScriptBin) - writeCBin = name: - writeC "/bin/${name}"; - # Like writeScript but the first line is a shebang to dash # # Example: |