diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-10-24 08:27:04 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-10-24 08:27:04 +0200 |
commit | 32389de159a0983f4daf7de446da6439a92a29a2 (patch) | |
tree | d670ccdd2e24a6a6f0dee7ff3c252b593377deb4 /pkgs/build-support | |
parent | 09c9a2de7e75191bebfb3397364809f94195224c (diff) | |
parent | 7044058ef779e8050aa4684a8f73114fdf39b849 (diff) | |
download | nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.gz nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.bz2 nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.lz nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.xz nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.zst nixlib-32389de159a0983f4daf7de446da6439a92a29a2.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/writers/default.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/writers/test.nix | 30 |
2 files changed, 31 insertions, 3 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index 8dbe0dbdbd03..2cd4f1af022b 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -92,13 +92,15 @@ rec { PATH=${makeBinPath [ pkgs.binutils-unwrapped pkgs.coreutils + pkgs.findutils pkgs.gcc pkgs.pkgconfig ]} + export PKG_CONFIG_PATH=${concatMapStringsSep ":" (pkg: "${pkg}/lib/pkgconfig") libraries} gcc \ ${optionalString (libraries != []) "$(pkg-config --cflags --libs ${ - concatMapStringsSep " " (pkg: "$(find ${escapeShellArg pkg}/lib/pkgsconfig -name \*.pc -exec basename {} \;)") libraries + concatMapStringsSep " " (pkg: "$(find ${escapeShellArg pkg}/lib/pkgconfig -name \\*.pc)") libraries })" } \ -O \ diff --git a/pkgs/build-support/writers/test.nix b/pkgs/build-support/writers/test.nix index d7c347a559ef..3cd0a080ae8f 100644 --- a/pkgs/build-support/writers/test.nix +++ b/pkgs/build-support/writers/test.nix @@ -1,4 +1,16 @@ -{ stdenv, lib, runCommand, haskellPackages, nodePackages, perlPackages, python2Packages, python3Packages, writers, writeText }: +{ + glib, + haskellPackages, + lib, + nodePackages, + perlPackages, + python2Packages, + python3Packages, + runCommand, + stdenv, + writers, + writeText +}: with writers; let @@ -49,9 +61,11 @@ let python2 = writePython2Bin "test_writers" { libraries = [ python2Packages.enum ]; } '' from enum import Enum + class Test(Enum): a = "success" + print Test.a ''; @@ -70,9 +84,19 @@ let if [[ "test" == "test" ]]; then echo "success"; fi ''; - c = writeC "test_c" { libraries = [ ]; } '' + c = writeC "test_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; } @@ -112,9 +136,11 @@ let python2 = writePython2 "test_python2" { libraries = [ python2Packages.enum ]; } '' from enum import Enum + class Test(Enum): a = "success" + print Test.a ''; |