nixpkgs/pkgs/test/simple/builder.sh
Eelco Dolstra de13527000 * Finally got stdenv-nix-linux working again. Still not perfect,
though.
* libxml2: upgrade to latest.
* octavefront/rna: keep debug info.

svn path=/nixpkgs/trunk/; revision=830
2004-03-11 17:26:14 +00:00

47 lines
704 B
Bash
Executable file

#! /bin/sh
set -x
export NIX_DEBUG=1
. $stdenv/setup
#echo starting shell
#/bin/sh < /dev/tty > /dev/tty 2>&1
#exit 1
mkdir $out
mkdir $out/bin
cat > hello.c <<EOF
#include <stdio.h>
int main(int argc, char * * argv)
{
printf("Hello World!\n");
return 0;
}
EOF
#gcc -I/nix/store/foo -I /nix/store/foo -I/usr/lib -I /usr/lib hello.c -o $out/bin/hello
gcc -L /nix/store/abcd/lib -isystem /usr/lib hello.c -o $out/bin/hello
$out/bin/hello
cat > hello2.cc <<EOF
#include <iostream>
int main(int argc, char * * argv)
{
std::cout << "Hello World!\n";
std::cout << VALUE << std::endl;
return 0;
}
EOF
g++ hello2.cc -o $out/bin/hello2 -DVALUE="1 + 2 * 3"
$out/bin/hello2
ld -v