summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-08-26 12:01:41 +0000
committerGitHub <noreply@github.com>2021-08-26 12:01:41 +0000
commit1ed959d5eb178e90edadc11cfd3fe0fd8954fa87 (patch)
treead8e7d0cedce128df2cd2bcfed364f6f925f46af /pkgs/build-support
parente5259f7a80a4fc05e83fb4abe1d91b1bd31fe121 (diff)
parentb13b005f0e80936eb9eb9dfcaea06b65e9d56648 (diff)
downloadnixpkgs-1ed959d5eb178e90edadc11cfd3fe0fd8954fa87.tar
nixpkgs-1ed959d5eb178e90edadc11cfd3fe0fd8954fa87.tar.gz
nixpkgs-1ed959d5eb178e90edadc11cfd3fe0fd8954fa87.tar.bz2
nixpkgs-1ed959d5eb178e90edadc11cfd3fe0fd8954fa87.tar.lz
nixpkgs-1ed959d5eb178e90edadc11cfd3fe0fd8954fa87.tar.xz
nixpkgs-1ed959d5eb178e90edadc11cfd3fe0fd8954fa87.tar.zst
nixpkgs-1ed959d5eb178e90edadc11cfd3fe0fd8954fa87.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/writers/default.nix45
-rw-r--r--pkgs/build-support/writers/test.nix26
2 files changed, 0 insertions, 71 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix
index 47919c251af..111ec68a602 100644
--- a/pkgs/build-support/writers/default.nix
+++ b/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:
diff --git a/pkgs/build-support/writers/test.nix b/pkgs/build-support/writers/test.nix
index 00cad9a96b5..69bc7dd2c61 100644
--- a/pkgs/build-support/writers/test.nix
+++ b/pkgs/build-support/writers/test.nix
@@ -17,14 +17,6 @@ let
      if [[ "test" == "test" ]]; then echo "success"; fi
     '';
 
-    c = writeCBin "test-writers-c" { libraries = [ ]; } ''
-      #include <stdio.h>
-      int main() {
-        printf("success\n");
-        return 0;
-      }
-    '';
-
     dash = writeDashBin "test-writers-dash-bin" ''
      test '~' = '~' && echo 'success'
     '';
@@ -88,24 +80,6 @@ let
      if [[ "test" == "test" ]]; then echo "success"; fi
     '';
 
-    c = writeC "test-writers-c" { libraries = [ glib.dev ]; } ''
-      #include <gio/gio.h>
-      #include <stdio.h>
-      int main() {
-        GApplication *application = g_application_new ("hello.world", G_APPLICATION_FLAGS_NONE);
-        g_application_register (application, NULL, NULL);
-        GNotification *notification = g_notification_new ("Hello world!");
-        g_notification_set_body (notification, "This is an example notification.");
-        GIcon *icon = g_themed_icon_new ("dialog-information");
-        g_notification_set_icon (notification, icon);
-        g_object_unref (icon);
-        g_object_unref (notification);
-        g_object_unref (application);
-        printf("success\n");
-        return 0;
-      }
-    '';
-
     dash = writeDash "test-writers-dash" ''
      test '~' = '~' && echo 'success'
     '';