diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-06-02 10:09:19 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-06-02 10:09:19 +0000 |
commit | 08d3840c94aa4016cdab441751ac78692dc600e2 (patch) | |
tree | 4236127f6485ca373d3313286905b2633d1adab3 /pkgs | |
parent | 91aebd86160c54b18a7eecc335a4f901eb867783 (diff) |
* A Hello World GUI application compiled with VC++.
svn path=/nixpkgs/trunk/; revision=5370
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/compilers/visual-c++/test/builder.sh | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/visual-c++/test/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/compilers/visual-c++/test/hello.c | 7 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
4 files changed, 26 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; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e449ec70215d4..81980378a2a90 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -832,6 +832,10 @@ rec { inherit fetchurl stdenv; }; + win32hello = import ../development/compilers/visual-c++/test { + inherit fetchurl stdenv visualcpp; + }; + ### DEVELOPMENT / DEBUGGERS |