about summary refs log tree commit diff
path: root/pkgs/development/compilers/visual-c++
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-06-02 10:09:19 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-06-02 10:09:19 +0000
commit08d3840c94aa4016cdab441751ac78692dc600e2 (patch)
tree4236127f6485ca373d3313286905b2633d1adab3 /pkgs/development/compilers/visual-c++
parent91aebd86160c54b18a7eecc335a4f901eb867783 (diff)
* A Hello World GUI application compiled with VC++.
svn path=/nixpkgs/trunk/; revision=5370
Diffstat (limited to 'pkgs/development/compilers/visual-c++')
-rw-r--r--pkgs/development/compilers/visual-c++/test/builder.sh5
-rw-r--r--pkgs/development/compilers/visual-c++/test/default.nix10
-rw-r--r--pkgs/development/compilers/visual-c++/test/hello.c7
3 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/development/compilers/visual-c++/test/builder.sh b/pkgs/development/compilers/visual-c++/test/builder.sh
new file mode 100644
index 0000000000000..2dfb99edabfcc
--- /dev/null
+++ b/pkgs/development/compilers/visual-c++/test/builder.sh
@@ -0,0 +1,5 @@
+source $stdenv/setup
+source $visualcpp/setup
+
+ensureDir $out/bin
+cl "$(cygpath -w $src)" /Fe"$(cygpath -w $out/bin/hello.exe)" user32.lib
diff --git a/pkgs/development/compilers/visual-c++/test/default.nix b/pkgs/development/compilers/visual-c++/test/default.nix
new file mode 100644
index 0000000000000..ca7bafab59ac4
--- /dev/null
+++ b/pkgs/development/compilers/visual-c++/test/default.nix
@@ -0,0 +1,10 @@
+{stdenv, fetchurl, visualcpp}:
+
+assert stdenv.system == "i686-cygwin";
+
+stdenv.mkDerivation {
+  name = "win32-hello";
+  builder = ./builder.sh;
+  src = ./hello.c;
+  inherit visualcpp;
+}
diff --git a/pkgs/development/compilers/visual-c++/test/hello.c b/pkgs/development/compilers/visual-c++/test/hello.c
new file mode 100644
index 0000000000000..7c96d6441a9ac
--- /dev/null
+++ b/pkgs/development/compilers/visual-c++/test/hello.c
@@ -0,0 +1,7 @@
+#include <windows.h>
+int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
+                   int nCmdShow)
+{
+    MessageBox(NULL, "Hello World!", "Nix", MB_OK);
+    return 0;
+}