forked from mirrors/nixpkgs
Merged with trunk again
svn path=/nixpkgs/branches/stdenv-updates/; revision=10267
This commit is contained in:
parent
4de89f61b0
commit
da57804fff
pkgs
applications
audio
editors
graphics
misc/xterm
networking
version-management
virtualization
window-managers
build-support
data/fonts/fontWrap
development
compilers
interpreters
libraries
fftw
glew
haskell
Crypto
X11
binary
cabal
pcre-light
uulib-ghc-6.6
uulib
vty
zlib
libdbi-drivers
libdbi
libextractor
python-modules
tools
documentation/haddock
haskell/uuagc
misc
parsing
games
lib
misc
os-specific/linux
atheros
dmidecode
dvd+rw-tools
kqemu
module-init-tools
sdparm
usbutils
servers
http
sql/postgresql
xmpp/ejabberd
stdenv/generic
tools
misc
networking
package-management/nix
|
@ -1,5 +1,5 @@
|
||||||
args: with args;
|
args: with args;
|
||||||
with (builderDefs {
|
let localDefs = builderDefs {
|
||||||
src =
|
src =
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = mirror://sourceforge/audacity/audacity-src-1.3.3.tar.gz;
|
url = mirror://sourceforge/audacity/audacity-src-1.3.3.tar.gz;
|
||||||
|
@ -8,7 +8,8 @@ args: with args;
|
||||||
|
|
||||||
buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk
|
buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk
|
||||||
gettext glib];
|
gettext glib];
|
||||||
} null);
|
} null;
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
postInstall = FullDepEntry ("
|
postInstall = FullDepEntry ("
|
||||||
old_rpath=$(patchelf --print-rpath \$out/bin/audacity);
|
old_rpath=$(patchelf --print-rpath \$out/bin/audacity);
|
||||||
|
@ -25,7 +26,7 @@ stdenv.mkDerivation {
|
||||||
name = "audacity-1.3.3";
|
name = "audacity-1.3.3";
|
||||||
|
|
||||||
builder = writeScript "audacity-1.3.3-builder"
|
builder = writeScript "audacity-1.3.3-builder"
|
||||||
(textClosure [addInputs (doDump "0") (noDepEntry "echo \$PATH; ar --version") doConfigure preBuild doMakeInstall postInstall doForceShare]);
|
(textClosure localDefs [addInputs (doDump "0") (noDepEntry "echo \$PATH; ar --version") doConfigure preBuild doMakeInstall postInstall doForceShare]);
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args: with args;
|
args: with args;
|
||||||
with (builderDefs {
|
let localDefs = builderDefs {
|
||||||
src =
|
src =
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz;
|
url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz;
|
||||||
|
@ -7,7 +7,8 @@ args: with args;
|
||||||
};
|
};
|
||||||
buildInputs = [fftw ladspaH pkgconfig];
|
buildInputs = [fftw ladspaH pkgconfig];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null);
|
} null;
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
postInstall = FullDepEntry ("
|
postInstall = FullDepEntry ("
|
||||||
ensureDir \$out/share/ladspa/
|
ensureDir \$out/share/ladspa/
|
||||||
|
@ -17,7 +18,7 @@ in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "swh-plugins-0.4.15";
|
name = "swh-plugins-0.4.15";
|
||||||
builder = writeScript "swh-plugins-0.4.15-builder"
|
builder = writeScript "swh-plugins-0.4.15-builder"
|
||||||
(textClosure [doConfigure doMakeInstall
|
(textClosure localDefs [doConfigure doMakeInstall
|
||||||
postInstall doForceShare]);
|
postInstall doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
|
|
|
@ -6,10 +6,11 @@ let
|
||||||
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
|
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
inherit src;
|
inherit src;
|
||||||
} null;
|
} null;
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
copyFile = FullDepEntry ("
|
copyFile = FullDepEntry ("
|
||||||
ensureDir \$out/include
|
ensureDir \$out/include
|
||||||
|
@ -19,7 +20,7 @@ in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "ladspa.h";
|
name = "ladspa.h";
|
||||||
builder = writeScript "ladspa.h-builder"
|
builder = writeScript "ladspa.h-builder"
|
||||||
(textClosure [copyFile]);
|
(textClosure localDefs [copyFile]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
LADSPA format audio plugins.
|
LADSPA format audio plugins.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src =
|
src =
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-9.4.tar.gz;
|
url = ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-9.4.tar.gz;
|
||||||
|
@ -20,6 +20,7 @@ args : with args;
|
||||||
++ (lib.optional (args ? sndlib) "--with-midi" )
|
++ (lib.optional (args ? sndlib) "--with-midi" )
|
||||||
;
|
;
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let preBuild = FullDepEntry ("
|
let preBuild = FullDepEntry ("
|
||||||
cp config.log /tmp/snd-config.log
|
cp config.log /tmp/snd-config.log
|
||||||
") [minInit doUnpack];
|
") [minInit doUnpack];
|
||||||
|
@ -27,7 +28,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "Snd-9.4";
|
name = "Snd-9.4";
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure preBuild doMakeInstall doForceShare]);
|
(textClosure localDefs [doConfigure preBuild doMakeInstall doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Snd sound editor.
|
Snd sound editor.
|
||||||
|
|
17
pkgs/applications/editors/bvi/default.nix
Normal file
17
pkgs/applications/editors/bvi/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
args:
|
||||||
|
args.stdenv.mkDerivation {
|
||||||
|
name = "bvi-1.3.2";
|
||||||
|
|
||||||
|
src = args.fetchurl {
|
||||||
|
url = http://prdownloads.sourceforge.net/bvi/bvi-1.3.2.src.tar.gz;
|
||||||
|
sha256 = "110wxqnyianqamxq4y53drqqxb9vp4k2fcvic45qggvlqkqhlfgz";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs =(with args; [ncurses]);
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "hex editor with vim style keybindings";
|
||||||
|
homepage = http://bvi.sourceforge.net/download.html;
|
||||||
|
license = "GPL2";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
source $stdenv/setup
|
source $stdenv/setup
|
||||||
source $makeWrapper
|
|
||||||
|
|
||||||
unpackFile $src
|
unpackFile $src
|
||||||
ensureDir $out
|
ensureDir $out
|
||||||
|
|
|
@ -6,7 +6,8 @@ let {
|
||||||
name = "eclipse-sdk-3.3.3.1";
|
name = "eclipse-sdk-3.3.3.1";
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
src = bindist;
|
src = bindist;
|
||||||
inherit makeWrapper jdk plugins;
|
buildInputs = [makeWrapper];
|
||||||
|
inherit jdk plugins;
|
||||||
libraries = [gtk glib libXtst];
|
libraries = [gtk glib libXtst];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://prdownloads.sourceforge.net/jocr/gocr-0.44.tar.gz;
|
url = http://prdownloads.sourceforge.net/jocr/gocr-0.44.tar.gz;
|
||||||
|
@ -9,10 +9,11 @@ fetchurl {
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "gocr";
|
name = "gocr";
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
GPL Optical Character Recognition
|
GPL Optical Character Recognition
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
source $stdenv/setup
|
source $stdenv/setup
|
||||||
source $makeWrapper
|
|
||||||
|
|
||||||
makeFlags="XAWLIB=-lXaw3d BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults LIBDIR=$out/lib/X11 XFIGDOCDIR=$out/share/doc/xfig MANPATH=$out/man"
|
makeFlags="XAWLIB=-lXaw3d BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults LIBDIR=$out/lib/X11 XFIGDOCDIR=$out/share/doc/xfig MANPATH=$out/man"
|
||||||
|
|
||||||
|
@ -16,9 +15,7 @@ installCommand=myInstall
|
||||||
myInstall() {
|
myInstall() {
|
||||||
make install.all $makeFlags
|
make install.all $makeFlags
|
||||||
|
|
||||||
mv $out/bin/xfig $out/bin/.xfig
|
wrapProgram $out/bin/xfig \
|
||||||
|
|
||||||
makeWrapper $out/bin/.xfig $out/bin/xfig \
|
|
||||||
--set XAPPLRESDIR $out/etc/X11/app-defaults
|
--set XAPPLRESDIR $out/etc/X11/app-defaults
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
buildInputs = [imake x11 libXpm libXmu libXi libXp Xaw3d libpng libjpeg];
|
buildInputs = [imake x11 libXpm libXmu libXi libXp Xaw3d libpng libjpeg makeWrapper];
|
||||||
|
|
||||||
inherit makeWrapper;
|
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-I${libXpm}/include/X11";
|
NIX_CFLAGS_COMPILE = "-I${libXpm}/include/X11";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
args : with args; with builderDefs (args // {
|
args : with args; let localDefs = builderDefs (args // {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://www.jwz.org/xscreensaver/xscreensaver-5.04.tar.gz;
|
url = http://www.jwz.org/xscreensaver/xscreensaver-5.04.tar.gz;
|
||||||
|
@ -20,6 +20,7 @@ args : with args; with builderDefs (args // {
|
||||||
" --with-hackdir=\$out/share/xscreensaver-hacks ")
|
" --with-hackdir=\$out/share/xscreensaver-hacks ")
|
||||||
];
|
];
|
||||||
}) null; /* null is a terminator for sumArgs */
|
}) null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
preConfigure = FullDepEntry ("
|
preConfigure = FullDepEntry ("
|
||||||
sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' "+
|
sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' "+
|
||||||
|
|
|
@ -7,5 +7,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0qlz5nkdqkahdg9kbd1ni96n69srj1pd9yggwrw3z0kghaajb2sr";
|
sha256 = "0qlz5nkdqkahdg9kbd1ni96n69srj1pd9yggwrw3z0kghaajb2sr";
|
||||||
};
|
};
|
||||||
buildInputs = [libXaw xproto libXt libX11 libSM libICE ncurses];
|
buildInputs = [libXaw xproto libXt libX11 libSM libICE ncurses];
|
||||||
|
configureFlags = ["--enable-wide-chars"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,13 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0vv1q86is9x6vw8fx92wrnvlyn4x29zgk9zjn66rcx37n6grqqah";
|
sha256 = "0vv1q86is9x6vw8fx92wrnvlyn4x29zgk9zjn66rcx37n6grqqah";
|
||||||
} else if (stdenv.system == "x86_64-linux") then
|
} else if (stdenv.system == "x86_64-linux") then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = ftp://ftp.task.gda.pl/pub/opera/linux/950b/final/en/x86_64/opera-9.50-20071024.2-shared-qt.x86_64-1643.tar.bz2;
|
url = http://snapshot.opera.com/unix/snapshot-1754/x86_64-linux/opera-9.50-20080110.2-shared-qt.x86_64-1754.tar.bz2;
|
||||||
sha256 = "1gv1r18ar3vz1l24nf8qixjlba1yb5d3xvg3by41i4dy0vlznqn6";
|
sha256 = "08y1ajjncdvbhvcq2izmpgc4fi37bwn43zsw7rz41jf8qhvb5ywv";
|
||||||
|
#url = ftp://ftp.task.gda.pl/pub/opera/linux/950b/final/en/x86_64/opera-9.50-20071024.2-shared-qt.x86_64-1643.tar.bz2;
|
||||||
|
#sha256 = "1gv1r18ar3vz1l24nf8qixjlba1yb5d3xvg3by41i4dy0vlznqn6";
|
||||||
|
#name = opera-9.25-20071214.6-shared-qt.i386-en.tar.gz;
|
||||||
|
#url = http://www.opera.com/download/get.pl?id=30462&location=225¬hanks=yes&sub=marine;
|
||||||
|
#sha256 = "1wnc1s4r5gz73mxs8pgsi9a1msz7x8a8pb1ykb1xgdfn21h69p2p";
|
||||||
} else throw "unsupported platform ${stdenv.system} (only i686-linux and x86_64 linux supported yet)";
|
} else throw "unsupported platform ${stdenv.system} (only i686-linux and x86_64 linux supported yet)";
|
||||||
|
|
||||||
# operapluginwrapper seems to require libXt ?
|
# operapluginwrapper seems to require libXt ?
|
||||||
|
|
|
@ -7,21 +7,15 @@ stdenv.mkDerivation {
|
||||||
sha256 = "808400a933aeb67654edc770822cd186d1b2adc92e7cb5836996c71c69ffe656";
|
sha256 = "808400a933aeb67654edc770822cd186d1b2adc92e7cb5836996c71c69ffe656";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ocaml];
|
buildInputs = [ocaml makeWrapper];
|
||||||
|
|
||||||
addInputsHook = "source $makeWrapper";
|
preBuild = "sed -i \"s|\\(OCAMLOPT=.*\\)$|\\1 -I ${lablgtk}/lib/ocaml/lablgtk2|\" Makefile.OCaml";
|
||||||
preBuild = "sed -i \"s|\\(OCAMLOPT=.*\\)$|\\1 -I $lablgtk/lib/ocaml/lablgtk2|\" Makefile.OCaml";
|
|
||||||
makeFlags = "UISTYLE=gtk2 INSTALLDIR=$(out)/bin/";
|
makeFlags = "UISTYLE=gtk2 INSTALLDIR=$(out)/bin/";
|
||||||
preInstall = "ensureDir $out/bin";
|
preInstall = "ensureDir $out/bin";
|
||||||
postInstall = [
|
postInstall = ''
|
||||||
"for i in $(cd $out/bin && ls); do"
|
for i in $(cd $out/bin && ls); do
|
||||||
" mv $out/bin/$i $out/bin/.orig-$i;"
|
wrapProgram $out/bin/$i \
|
||||||
" echo \"#! $SHELL\" > $out/bin/$i;"
|
--run "${xset}/bin/xset q | grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\""
|
||||||
" echo \"$xset/bin/xset q | grep -q \\\"$fontschumachermisc\\\" || $xset/bin/xset +fp \\\"$fontschumachermisc/lib/X11/fonts/misc\\\"\" >> $out/bin/$i;"
|
done
|
||||||
" echo \"exec \\\"$out/bin/.orig-$i\\\" \\\"\\\$@\\\"\" >> $out/bin/$i;"
|
'';
|
||||||
" chmod +x $out/bin/$i;"
|
|
||||||
"done"
|
|
||||||
];
|
|
||||||
|
|
||||||
inherit lablgtk fontschumachermisc xset makeWrapper;
|
|
||||||
}
|
}
|
||||||
|
|
22
pkgs/applications/version-management/bazaar/default.nix
Normal file
22
pkgs/applications/version-management/bazaar/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{stdenv, fetchurl, python, makeWrapper}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "bazaar-1.1";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = https://launchpad.net/bzr/1.1/1.1/+download/bzr-1.1.tar.gz;
|
||||||
|
sha256 = "1qpkw580r22yxybdghx2ha0kyk22brbhd1kg9wwjh209dqy2gqzc";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [python makeWrapper];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
python setup.py install --prefix=$out
|
||||||
|
wrapProgram $out/bin/bzr --prefix PYTHONPATH : "$(toPythonPath $out)"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = http://bazaar-vcs.org/;
|
||||||
|
description = "A distributed version control system that Just Works";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,25 +1,27 @@
|
||||||
{stdenv, fetchurl, python, bsddb3, makeWrapper}:
|
{stdenv, fetchurl, python, makeWrapper}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "cvs2svn-1.5.1";
|
name = "cvs2svn-2.0.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://cvs2svn.tigris.org/files/documents/1462/36129/cvs2svn-1.5.1.tar.gz;
|
url = http://cvs2svn.tigris.org/files/documents/1462/39919/cvs2svn-2.0.1.tar.gz;
|
||||||
md5 = "d1e42ea51b373be0023f2b3f6b80ec01";
|
sha256 = "1pgbyxzgn22lnw3h5c2nd8z46pkk863jg3fgh9pqa1jihsx1cg1j";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [python bsddb3];
|
buildInputs = [python makeWrapper];
|
||||||
|
|
||||||
buildPhase = "true";
|
buildPhase = "true";
|
||||||
installPhase = "
|
installPhase = ''
|
||||||
python ./setup.py install --prefix=$out
|
python ./setup.py install --prefix=$out
|
||||||
|
wrapProgram $out/bin/cvs2svn \
|
||||||
source ${makeWrapper}
|
--set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH"
|
||||||
mv $out/bin/cvs2svn $out/bin/.orig-cvs2svn
|
'';
|
||||||
makeWrapper $out/bin/.orig-cvs2svn $out/bin/cvs2svn \\
|
|
||||||
--set PYTHONPATH \"$(toPythonPath $out):$(toPythonPath ${bsddb3}):$PYTHONPATH\"
|
|
||||||
";
|
|
||||||
|
|
||||||
/* !!! maybe we should absolutise the program names in
|
/* !!! maybe we should absolutise the program names in
|
||||||
$out/lib/python2.4/site-packages/cvs2svn_lib/config.py. */
|
$out/lib/python2.4/site-packages/cvs2svn_lib/config.py. */
|
||||||
}
|
|
||||||
|
meta = {
|
||||||
|
description = "A tool to convert CVS repositories to Subversion repositories";
|
||||||
|
homepage = http://cvs2svn.tigris.org/;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -7,20 +7,17 @@ stdenv.mkDerivation {
|
||||||
sha256 = "1n34yl4z7nc3vmsgpkmqc94hsmy846ny86xgpgv3m371ljm2pq6g";
|
sha256 = "1n34yl4z7nc3vmsgpkmqc94hsmy846ny86xgpgv3m371ljm2pq6g";
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit makeWrapper;
|
buildInputs = [ python makeWrapper ];
|
||||||
|
|
||||||
buildInputs = [ python ];
|
|
||||||
addInputsHook = "source $makeWrapper";
|
|
||||||
makeFlags = "PREFIX=$(out)";
|
makeFlags = "PREFIX=$(out)";
|
||||||
postInstall = [
|
postInstall = ''
|
||||||
"for i in $(cd $out/bin && ls); do"
|
for i in $(cd $out/bin && ls); do
|
||||||
" mv $out/bin/$i $out/bin/.orig-$i;"
|
wrapProgram $out/bin/$i \
|
||||||
" makeWrapper $out/bin/.orig-$i $out/bin/$i"
|
--prefix PYTHONPATH : "$(toPythonPath $out)"
|
||||||
" --set PYTHONPATH \"$(toPythonPath $out):$PYTHONPATH:\$PYTHONPATH\";"
|
done
|
||||||
"done"
|
'';
|
||||||
];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "a fast, lightweight SCM system for very large distributed projects";
|
description = "A fast, lightweight SCM system for very large distributed projects";
|
||||||
|
homepage = http://www.selenic.com/mercurial/;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://fabrice.bellard.free.fr/qemu/qemu-0.9.0.tar.gz;
|
url = http://fabrice.bellard.free.fr/qemu/qemu-0.9.0.tar.gz;
|
||||||
|
@ -9,6 +9,7 @@ args : with args;
|
||||||
buildInputs = [ SDL zlib which ];
|
buildInputs = [ SDL zlib which ];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
preConfigure = FullDepEntry ("
|
preConfigure = FullDepEntry ("
|
||||||
gcc --version
|
gcc --version
|
||||||
|
@ -17,7 +18,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "qemu-"+version;
|
name = "qemu-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [ preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [ preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
QEmu processor emulator.
|
QEmu processor emulator.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://fabrice.bellard.free.fr/qemu/linux-0.2.img.bz2;
|
url = http://fabrice.bellard.free.fr/qemu/linux-0.2.img.bz2;
|
||||||
|
@ -9,6 +8,7 @@ args : with args;
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
doCopy = FullDepEntry ("
|
doCopy = FullDepEntry ("
|
||||||
ensureDir \$out/share/qemu-images
|
ensureDir \$out/share/qemu-images
|
||||||
|
@ -18,7 +18,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "QEmu-Linux-Image-"+version;
|
name = "QEmu-Linux-Image-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doCopy doForceShare doPropagate]);
|
(textClosure localDefs [doCopy doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
${abort "Write a description"}
|
${abort "Write a description"}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://www.virtualbox.org/download/1.5.2/VirtualBox-1.5.2_OSE.tar.bz2;
|
url = http://www.virtualbox.org/download/1.5.2/VirtualBox-1.5.2_OSE.tar.bz2;
|
||||||
|
@ -9,10 +9,11 @@ args : with args;
|
||||||
wine jre libxslt libIDL SDL qt3 openssl zlib];
|
wine jre libxslt libIDL SDL qt3 openssl zlib];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "VirtualBox-"+version;
|
name = "VirtualBox-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Virtual Box is just software for running virtual machines.
|
Virtual Box is just software for running virtual machines.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/0.6.0/compiz-bcop-0.6.0.tar.bz2;
|
url = http://releases.compiz-fusion.org/0.6.0/compiz-bcop-0.6.0.tar.bz2;
|
||||||
|
@ -9,6 +9,7 @@ args : with args;
|
||||||
propagatedBuildInputs = [getopt libxslt];
|
propagatedBuildInputs = [getopt libxslt];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
fixPkgconfig = FullDepEntry ("
|
fixPkgconfig = FullDepEntry ("
|
||||||
ensureDir \$out/lib
|
ensureDir \$out/lib
|
||||||
|
@ -21,7 +22,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "compiz-bcop-"+version;
|
name = "compiz-bcop-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doAutotools doConfigure doMakeInstall fixPkgconfig fixInterpreter doForceShare
|
(textClosure localDefs [doAutotools doConfigure doMakeInstall fixPkgconfig fixInterpreter doForceShare
|
||||||
doPropagate]);
|
doPropagate]);
|
||||||
inherit propagatedBuildInputs;
|
inherit propagatedBuildInputs;
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/0.6.0/ccsm-0.6.0.tar.bz2;
|
url = http://releases.compiz-fusion.org/0.6.0/ccsm-0.6.0.tar.bz2;
|
||||||
|
@ -15,10 +15,11 @@ args : with args;
|
||||||
"PYTHONPATH" "$(toPythonPath ${pygtk})/gtk-2.0"
|
"PYTHONPATH" "$(toPythonPath ${pygtk})/gtk-2.0"
|
||||||
];
|
];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "compizconfig-settings-"+args.version;
|
name = "compizconfig-settings-"+args.version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [installPythonPackage (doWrap "\$out/bin/ccsm")]);
|
(textClosure localDefs [installPythonPackage (doWrap "\$out/bin/ccsm")]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Compiz Settings Manager
|
Compiz Settings Manager
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/0.6.0/compiz-manager-0.6.0.tar.bz2;
|
url = http://releases.compiz-fusion.org/0.6.0/compiz-manager-0.6.0.tar.bz2;
|
||||||
|
@ -20,6 +20,7 @@ args : with args;
|
||||||
"XORG_DRIVER_PATH" "/nix/store/.*"
|
"XORG_DRIVER_PATH" "/nix/store/.*"
|
||||||
]];
|
]];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
install = FullDepEntry ("
|
install = FullDepEntry ("
|
||||||
sed -e '/Checking for texture_from_pixmap:/areturn 0' -i compiz-manager
|
sed -e '/Checking for texture_from_pixmap:/areturn 0' -i compiz-manager
|
||||||
|
@ -34,7 +35,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "compiz-manager-"+args.version;
|
name = "compiz-manager-"+args.version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doUnpack doReplaceScripts install doPropagate doForceShare]);
|
(textClosure localDefs [doUnpack doReplaceScripts install doPropagate doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Compiz Launch Manager
|
Compiz Launch Manager
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/0.6.0.1/compizconfig-python-0.6.0.1.tar.bz2;
|
url = http://releases.compiz-fusion.org/0.6.0.1/compizconfig-python-0.6.0.1.tar.bz2;
|
||||||
|
@ -9,10 +9,11 @@ args : with args;
|
||||||
[libcompizconfig bcop python pyrex configBackendGConf];
|
[libcompizconfig bcop python pyrex configBackendGConf];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "compizconfig-python-"+args.version;
|
name = "compizconfig-python-"+args.version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doAutotools doConfigure doMakeInstall doForceShare]);
|
(textClosure localDefs [doAutotools doConfigure doMakeInstall doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Compiz configuration - Python part.
|
Compiz configuration - Python part.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/0.6.0/compizconfig-backend-gconf-0.6.0.tar.bz2;
|
url = http://releases.compiz-fusion.org/0.6.0/compizconfig-backend-gconf-0.6.0.tar.bz2;
|
||||||
|
@ -10,10 +10,11 @@ args : with args;
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
forceShare = ["man" "doc" "info" "lib/compizconfig"];
|
forceShare = ["man" "doc" "info" "lib/compizconfig"];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "compizconfig-backend-GConf-"+version;
|
name = "compizconfig-backend-GConf-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doAutotools doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doAutotools doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Compiz configuration backend (GConf).
|
Compiz configuration backend (GConf).
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/0.6.0/compiz-fusion-plugins-extra-0.6.0.tar.bz2;
|
url = http://releases.compiz-fusion.org/0.6.0/compiz-fusion-plugins-extra-0.6.0.tar.bz2;
|
||||||
|
@ -9,6 +9,7 @@ args : with args;
|
||||||
[bcop libjpeg gettext pluginsMain];
|
[bcop libjpeg gettext pluginsMain];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
sharePlugins = FullDepEntry ("
|
sharePlugins = FullDepEntry ("
|
||||||
ensureDir \$out/share/compiz-plugins
|
ensureDir \$out/share/compiz-plugins
|
||||||
|
@ -22,7 +23,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "compiz-fusion-plugins-extra-"+version;
|
name = "compiz-fusion-plugins-extra-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [fixIncludes doConfigure doMakeInstall sharePlugins doForceShare]);
|
(textClosure localDefs [fixIncludes doConfigure doMakeInstall sharePlugins doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Extra Compiz Fusion plugins.
|
Extra Compiz Fusion plugins.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/0.6.0/libcompizconfig-0.6.0.tar.bz2;
|
url = http://releases.compiz-fusion.org/0.6.0/libcompizconfig-0.6.0.tar.bz2;
|
||||||
|
@ -9,10 +9,11 @@ args : with args;
|
||||||
[bcop];
|
[bcop];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libcompizconfig-"+version;
|
name = "libcompizconfig-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doAutotools doConfigure doMakeInstall doForceShare]);
|
(textClosure localDefs [doAutotools doConfigure doMakeInstall doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Compiz configuration backend library.
|
Compiz configuration backend library.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/0.6.0/compiz-fusion-plugins-main-0.6.0.tar.bz2;
|
url = http://releases.compiz-fusion.org/0.6.0/compiz-fusion-plugins-main-0.6.0.tar.bz2;
|
||||||
|
@ -9,6 +9,7 @@ args : with args;
|
||||||
[bcop libjpeg gettext];
|
[bcop libjpeg gettext];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
sharePlugins = FullDepEntry ("
|
sharePlugins = FullDepEntry ("
|
||||||
ensureDir \$out/share/compiz-plugins
|
ensureDir \$out/share/compiz-plugins
|
||||||
|
@ -18,7 +19,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "compiz-fusion-plugins-main-"+version;
|
name = "compiz-fusion-plugins-main-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall sharePlugins doForceShare]);
|
(textClosure localDefs [doConfigure doMakeInstall sharePlugins doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Main Compiz Fusion plugins.
|
Main Compiz Fusion plugins.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://releases.compiz-fusion.org/compiz/0.6.2/compiz-0.6.2.tar.bz2;
|
url = http://releases.compiz-fusion.org/compiz/0.6.2/compiz-0.6.2.tar.bz2;
|
||||||
|
@ -22,6 +22,7 @@ args : with args;
|
||||||
(if args ? extraConfigureFlags then args.extraConfigureFlags else []);
|
(if args ? extraConfigureFlags then args.extraConfigureFlags else []);
|
||||||
patches = [ ./glx-patch-0.6.2.patch ];
|
patches = [ ./glx-patch-0.6.2.patch ];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
postAll = FullDepEntry ("
|
postAll = FullDepEntry ("
|
||||||
for i in $out/bin/*; do
|
for i in $out/bin/*; do
|
||||||
|
@ -36,7 +37,7 @@ stdenv.mkDerivation
|
||||||
rec {
|
rec {
|
||||||
name = "compiz-0.6.2";
|
name = "compiz-0.6.2";
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doPatch doConfigure doMakeInstall doPropagate
|
(textClosure localDefs [doPatch doConfigure doMakeInstall doPropagate
|
||||||
doForceShare postAll]);
|
doForceShare postAll]);
|
||||||
inherit propagatedBuildInputs;
|
inherit propagatedBuildInputs;
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://garr.dl.sourceforge.net/sourceforge/fbpanel/fbpanel-4.12.tgz;
|
url = http://garr.dl.sourceforge.net/sourceforge/fbpanel/fbpanel-4.12.tgz;
|
||||||
|
@ -10,10 +10,11 @@ args : with args;
|
||||||
libpng libjpeg libtiff librsvg];
|
libpng libjpeg libtiff librsvg];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "fbpanel";
|
name = "fbpanel";
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Just a desktop panel.
|
Just a desktop panel.
|
||||||
|
|
42
pkgs/applications/window-managers/xmonad/default.nix
Normal file
42
pkgs/applications/window-managers/xmonad/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{stdenv, fetchurl, ghc, X11, xmessage}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
|
pname = "xmonad";
|
||||||
|
version = "0.5";
|
||||||
|
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://hackage.haskell.org/packages/archive/${pname}/${version}/${name}.tar.gz";
|
||||||
|
sha256 = "cfcc4501b000fa740ed35a5be87dc01216e036219551630dcf71d9c3cf57e4c4";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ghc X11];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "xmonad is a tiling window manager for X";
|
||||||
|
};
|
||||||
|
|
||||||
|
configurePhase = ''
|
||||||
|
sed -i 's|"xmessage"|"${xmessage}/bin/xmessage"|' XMonad/Core.hs
|
||||||
|
ghc --make Setup.lhs
|
||||||
|
./Setup configure --prefix="$out"
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
./Setup build
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
./Setup copy
|
||||||
|
./Setup register --gen-script
|
||||||
|
mkdir $out/nix-support
|
||||||
|
sed -i 's/|.*\(ghc-pkg update\)/| \1/' register.sh
|
||||||
|
cp register.sh $out/nix-support/register-ghclib.sh
|
||||||
|
sed -i 's/\(ghc-pkg update\)/\1 --user/' register.sh
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp register.sh $out/bin/register-ghclib-${name}.sh
|
||||||
|
'';
|
||||||
|
|
||||||
|
})
|
|
@ -42,4 +42,10 @@ rec {
|
||||||
ftp://ftp.heanet.ie/mirrors/ftp.kde.org/
|
ftp://ftp.heanet.ie/mirrors/ftp.kde.org/
|
||||||
ftp://ftp.kde.org/pub/kde/
|
ftp://ftp.kde.org/pub/kde/
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Gentoo files.
|
||||||
|
gentoo = [
|
||||||
|
http://www.ibiblio.org/pub/Linux/distributions/gentoo/
|
||||||
|
http://distfiles.gentoo.org/
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
makeWrapper() {
|
makeWrapper() {
|
||||||
original=$1
|
local original=$1
|
||||||
wrapper=$2
|
local wrapper=$2
|
||||||
|
local params varName value command separator n fileNames
|
||||||
|
|
||||||
ensureDir "$(dirname $wrapper)"
|
ensureDir "$(dirname $wrapper)"
|
||||||
|
|
||||||
|
@ -17,6 +18,12 @@ makeWrapper() {
|
||||||
echo "export $varName=$value" >> $wrapper
|
echo "export $varName=$value" >> $wrapper
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$p" = "--run"; then
|
||||||
|
command=${params[$((n + 1))]}
|
||||||
|
n=$((n + 1))
|
||||||
|
echo "$command" >> $wrapper
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$p" = "--suffix" -o "$p" = "--prefix"; then
|
if test "$p" = "--suffix" -o "$p" = "--prefix"; then
|
||||||
varName=${params[$((n + 1))]}
|
varName=${params[$((n + 1))]}
|
||||||
separator=${params[$((n + 2))]}
|
separator=${params[$((n + 2))]}
|
||||||
|
@ -72,3 +79,11 @@ filterExisting() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Syntax: wrapProgram <PROGRAM> <MAKE-WRAPPER FLAGS...>
|
||||||
|
wrapProgram() {
|
||||||
|
local prog="$1"
|
||||||
|
local hidden="$(dirname "$prog")/.wrapped-$(basename "$prog")"
|
||||||
|
mv $prog $hidden
|
||||||
|
makeWrapper $hidden $prog "$@"
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src =""; /* put a fetchurl here */
|
src =""; /* put a fetchurl here */
|
||||||
buildInputs = [mkfontdir mkfontscale];
|
buildInputs = [mkfontdir mkfontscale];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
doInstall = FullDepEntry ("
|
doInstall = FullDepEntry ("
|
||||||
ensureDir \$out/share/fonts/
|
ensureDir \$out/share/fonts/
|
||||||
|
@ -18,10 +19,10 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "wrapped-font-dir";
|
name = "wrapped-font-dir";
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [ doInstall doForceShare doPropagate]);
|
(textClosure localDefs [ doInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Just a wrapper to create fots.dir and fonts.scale .
|
Just a wrapper to create fonts.dir and fonts.scale .
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
rec {
|
rec {
|
||||||
# using undocumented feature that attribute can contain hyphens when using listToAttrs
|
# using undocumented feature that attribute can contain hyphens when using listToAttrs
|
||||||
# You should be able to get the attribute values using __getAttr
|
# You should be able to get the attribute values using __getAttr
|
||||||
result = builtins.listToAttrs (map ( l : lib.av l.name (
|
result = builtins.listToAttrs (map ( l : lib.nv l.name (
|
||||||
packageByPackageDB ghc l.name
|
packageByPackageDB ghc l.name
|
||||||
("lib/ghc-${ghc.version}/${l.name}.conf")
|
("lib/ghc-${ghc.version}/${l.name}.conf")
|
||||||
(map (n: builtins.getAttr n result) l.deps)
|
(map (n: builtins.getAttr n result) l.deps)
|
||||||
|
@ -80,6 +80,7 @@
|
||||||
+" --prefix=\$out "
|
+" --prefix=\$out "
|
||||||
+" --with-ghc=\$ghcboot/bin/ghc"
|
+" --with-ghc=\$ghcboot/bin/ghc"
|
||||||
+" --with-gmp-libraries=$gmp/lib"
|
+" --with-gmp-libraries=$gmp/lib"
|
||||||
|
+" --with-gmp-includes=${gmp}/include"
|
||||||
+" --with-readline-libraries=\"$readline/lib\"";
|
+" --with-readline-libraries=\"$readline/lib\"";
|
||||||
|
|
||||||
# now read the main package.conf and create a single package db file for each of them
|
# now read the main package.conf and create a single package db file for each of them
|
||||||
|
@ -107,26 +108,26 @@
|
||||||
|
|
||||||
# Why this effort? If you want to use pretty-0.9 you can do this now without cabal choosing the 1.0 version hassle
|
# Why this effort? If you want to use pretty-0.9 you can do this now without cabal choosing the 1.0 version hassle
|
||||||
core_libs = resolveDeps ghc
|
core_libs = resolveDeps ghc
|
||||||
[ { name = "Cabal-1.2.0"; deps = ["base-2.1" "pretty-1.0" "old-locale-1.0" "old-time-1.0" "directory-1.0" "unix-2.0" "process-1.0" "array-0.1" "containers-0.1" "rts-1.0" "filepath-1.0"];} #
|
[ { name = "Cabal-1.2.3.0"; deps = ["base-3.0.1.0" "pretty-1.0.0.0" "old-locale-1.0.0.0" "old-time-1.0.0.0" "directory-1.0.0.0" "unix-2.3.0.0" "process-1.0.0.0" "array-0.1.0.0" "containers-0.1.0.1" "rts-1.0" "filepath-1.1.0.0"];} #
|
||||||
{ name = "array-0.1"; deps = ["base-2.1"];}
|
{ name = "array-0.1.0.0"; deps = ["base-3.0.1.0"];}
|
||||||
{ name = "base-2.1"; deps = [];} #
|
{ name = "base-3.0.1.0"; deps = [];} #
|
||||||
{ name = "bytestring-0.9"; deps = [ "base-2.1" "array-0.1" ];}
|
{ name = "bytestring-0.9.0.1"; deps = [ "base-3.0.1.0" "array-0.1.0.0" ];}
|
||||||
{ name = "containers-0.1"; deps = [ "base-2.1" "array-0.1" ];}
|
{ name = "containers-0.1.0.1"; deps = [ "base-3.0.1.0" "array-0.1.0.0" ];}
|
||||||
{ name = "directory-1.0"; deps = [ "base-2.1" "old-locale-1.0" "old-time-1.0" "filepath-1.0"];}
|
{ name = "directory-1.0.0.0"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" "old-time-1.0.0.0" "filepath-1.1.0.0"];}
|
||||||
{ name = "filepath-1.0"; deps = [ "base-2.1" ];} #
|
{ name = "filepath-1.1.0.0"; deps = [ "base-3.0.1.0" ];} #
|
||||||
{ name = "ghc-6.8.0.20071004"; deps = [ "base-2.1" "old-locale-1.0" "old-time-1.0" "filepath-1.0" "directory-1.0" "array-0.1" "containers-0.1" "hpc-0.5" "bytestring-0.9" "pretty-1.0" "packedstring-0.1" "template-haskell-0.1" "unix-2.0" "process-1.0" "readline-1.0" "Cabal-1.2.0" "random-1.0" "haskell98-1.0"];}
|
{ name = "ghc-${version}"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" "old-time-1.0.0.0" "filepath-1.1.0.0" "directory-1.0.0.0" "array-0.1.0.0" "containers-0.1.0.1" "hpc-0.5.0.0" "bytestring-0.9.0.1" "pretty-1.0.0.0" "packedstring-0.1.0.0" "template-haskell-2.2.0.0" "unix-2.3.0.0" "process-1.0.0.0" "readline-1.0.1.0" "Cabal-1.2.3.0" "random-1.0.0.0" "haskell98-1.0.1.0"];}
|
||||||
{ name = "haskell98-1.0"; deps = [ "base-2.1" "old-locale-1.0" "old-time-1.0" "filepath-1.0" "directory-1.0" "random-1.0" "unix-2.0" "process-1.0" "array-0.1"];}
|
{ name = "haskell98-1.0.1.0"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" "old-time-1.0.0.0" "filepath-1.1.0.0" "directory-1.0.0.0" "random-1.0.0.0" "unix-2.3.0.0" "process-1.0.0.0" "array-0.1.0.0"];}
|
||||||
{ name = "hpc-0.5"; deps = [ "base-2.1" "old-locale-1.0" "old-time-1.0" "filepath-1.0" "directory-1.0" "array-0.1" "containers-0.1"]; }
|
{ name = "hpc-0.5.0.0"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" "old-time-1.0.0.0" "filepath-1.1.0.0" "directory-1.0.0.0" "array-0.1.0.0" "containers-0.1.0.1"]; }
|
||||||
{ name = "old-locale-1.0"; deps = [ "base-2.1"];}
|
{ name = "old-locale-1.0.0.0"; deps = [ "base-3.0.1.0"];}
|
||||||
{ name = "old-time-1.0"; deps = [ "base-2.1" "old-locale-1.0" ];}
|
{ name = "old-time-1.0.0.0"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" ];}
|
||||||
{ name = "packedstring-0.1"; deps = [ "base-2.1" "array-0.1" ];}
|
{ name = "packedstring-0.1.0.0"; deps = [ "base-3.0.1.0" "array-0.1.0.0" ];}
|
||||||
{ name = "pretty-1.0"; deps = [ "base-2.1" ];}
|
{ name = "pretty-1.0.0.0"; deps = [ "base-3.0.1.0" ];}
|
||||||
{ name = "process-1.0"; deps = [ "base-2.1" "old-locale-1.0" "old-time-1.0" "filepath-1.0" "directory-1.0" "unix-2.0"];}
|
{ name = "process-1.0.0.0"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" "old-time-1.0.0.0" "filepath-1.1.0.0" "directory-1.0.0.0" "unix-2.3.0.0"];}
|
||||||
{ name = "random-1.0"; deps = [ "base-2.1" "old-locale-1.0" "old-time-1.0"];}
|
{ name = "random-1.0.0.0"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" "old-time-1.0.0.0"];}
|
||||||
{ name = "readline-1.0"; deps = [ "base-2.1" "old-locale-1.0" "old-time-1.0" "filepath-1.0" "directory-1.0" "unix-2.0" "process-1.0" ];}
|
{ name = "readline-1.0.1.0"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" "old-time-1.0.0.0" "filepath-1.1.0.0" "directory-1.0.0.0" "unix-2.3.0.0" "process-1.0.0.0" ];}
|
||||||
{ name = "rts-1.0"; deps = [ "base-2.1" ];} #
|
{ name = "rts-1.0"; deps = [ "base-3.0.1.0" ];} #
|
||||||
{ name = "template-haskell-0.1"; deps = [ "base-2.1" "pretty-1.0" "array-0.1" "packedstring-0.1" "containers-0.1" ];}
|
{ name = "template-haskell-2.2.0.0"; deps = [ "base-3.0.1.0" "pretty-1.0.0.0" "array-0.1.0.0" "packedstring-0.1.0.0" "containers-0.1.0.1" ];}
|
||||||
{ name = "unix-2.0"; deps = [ "base-2.1" "old-locale-1.0" "old-time-1.0" "filepath-1.0" "directory-1.0" ];}
|
{ name = "unix-2.3.0.0"; deps = [ "base-3.0.1.0" "old-locale-1.0.0.0" "old-time-1.0.0.0" "filepath-1.1.0.0" "directory-1.0.0.0" ];}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,18 +138,20 @@
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
ghc68 = ghcAndLibraries {
|
ghc68 = ghcAndLibraries rec {
|
||||||
version = "6.8.0.20071004";
|
version = "6.8.2";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.haskell.org/ghc/dist/stable/dist/ghc-6.8.0.20071004-src.tar.bz2;
|
#url = http://www.haskell.org/ghc/dist/stable/dist/ghc-6.8.0.20071004-src.tar.bz2;
|
||||||
sha256 = "1yyl7sxykmvkiwfxkfzpqa6cmgw19phkyjcdv99ml22j16wli63l";
|
#sha256 = "1yyl7sxykmvkiwfxkfzpqa6cmgw19phkyjcdv99ml22j16wli63l";
|
||||||
|
url = "http://www.haskell.org/ghc/dist/stable/dist/ghc-${version}-src.tar.bz2";
|
||||||
|
md5 = "745c6b7d4370610244419cbfec4b2f84";
|
||||||
#url = http://www.haskell.org/ghc/dist/stable/dist/ghc-6.8.20070912-src.tar.bz2;
|
#url = http://www.haskell.org/ghc/dist/stable/dist/ghc-6.8.20070912-src.tar.bz2;
|
||||||
#sha256 = "1b1gvi7hc7sc0fkh29qvzzd5lgnlvdv3ayiak4mkfnzkahvmq85s";
|
#sha256 = "1b1gvi7hc7sc0fkh29qvzzd5lgnlvdv3ayiak4mkfnzkahvmq85s";
|
||||||
};
|
};
|
||||||
|
|
||||||
extra_src = fetchurl {
|
extra_src = fetchurl {
|
||||||
url = http://www.haskell.org/ghc/dist/stable/dist/ghc-6.8.0.20071004-src-extralibs.tar.bz2;
|
url = "http://www.haskell.org/ghc/dist/stable/dist/ghc-${version}-src-extralibs.tar.bz2";
|
||||||
sha256 = "0vjx4vb2xhv5v2wj74ii3gpjim7x9wj0m87zglqlhc8xn31pmrd2";
|
sha256 = "044mpbzpkbxcnqhjnrnmjs00mr85057d123rrlz2vch795lxbkcn";
|
||||||
#url = http://www.haskell.org/ghc/dist/stable/dist/ghc-6.8.20070912-src-extralibs.tar.bz2;
|
#url = http://www.haskell.org/ghc/dist/stable/dist/ghc-6.8.20070912-src-extralibs.tar.bz2;
|
||||||
#sha256 = "0py7d9nh3lkhjxr3yb3n9345d0hmzq79bi40al5rcr3sb84rnp9r";
|
#sha256 = "0py7d9nh3lkhjxr3yb3n9345d0hmzq79bi40al5rcr3sb84rnp9r";
|
||||||
};
|
};
|
||||||
|
@ -165,4 +168,3 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
buildInputs="$unzip"
|
||||||
source $stdenv/setup
|
source $stdenv/setup
|
||||||
|
|
||||||
src=$filename.bin
|
src=$filename.bin
|
||||||
|
|
9
pkgs/development/compilers/jdk/default-5.nix
Normal file
9
pkgs/development/compilers/jdk/default-5.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{stdenv, fetchurl, unzip}:
|
||||||
|
|
||||||
|
if stdenv.system == "i686-linux"
|
||||||
|
then
|
||||||
|
(import ./jdk5-sun-linux.nix) {
|
||||||
|
inherit stdenv fetchurl unzip;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
abort "the Java 5 SDK is not supported on this platform"
|
23
pkgs/development/compilers/jdk/jdk5-sun-linux.nix
Normal file
23
pkgs/development/compilers/jdk/jdk5-sun-linux.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/**
|
||||||
|
* This Nix expression requires the user to download the j2sdk
|
||||||
|
* distribution to /tmp. Please obtain jdk-1_5_0_14-linux-i586.bin
|
||||||
|
* from java.sun.com by hand and place it in /tmp. Blame Sun, not me.
|
||||||
|
*
|
||||||
|
* Note that this is not necessary if someone has already pushed a
|
||||||
|
* binary.
|
||||||
|
*/
|
||||||
|
{stdenv, fetchurl, unzip}:
|
||||||
|
|
||||||
|
assert stdenv.system == "i686-linux";
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "jdk-1.5.0_14";
|
||||||
|
filename = "jdk-1_5_0_14";
|
||||||
|
dirname = "jdk1.5.0_14";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
pathname = "/tmp/jdk-1_5_0_14-linux-i586.bin";
|
||||||
|
md5 = "32df8f2be09c3a0f39da1b3869164b55";
|
||||||
|
stdenv = stdenv;
|
||||||
|
|
||||||
|
inherit unzip;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://www.lambdassociates.org/Download/Qi9.1.zip;
|
url = http://www.lambdassociates.org/Download/Qi9.1.zip;
|
||||||
|
@ -8,6 +8,7 @@ args : with args;
|
||||||
buildInputs = [ unzip clisp];
|
buildInputs = [ unzip clisp];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
shell=stdenv.shell;
|
shell=stdenv.shell;
|
||||||
in
|
in
|
||||||
|
@ -28,7 +29,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "Qi-"+version;
|
name = "Qi-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [allBuild doForceShare doPropagate]);
|
(textClosure localDefs [allBuild doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Qi - next generation on top of Common Lisp.
|
Qi - next generation on top of Common Lisp.
|
||||||
|
|
14
pkgs/development/interpreters/erlang/builder.sh
Normal file
14
pkgs/development/interpreters/erlang/builder.sh
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
buildInputs="$perl $gnum4 $ncurses $openssl"
|
||||||
|
|
||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
tar xfvz $src
|
||||||
|
cd otp_src_*
|
||||||
|
|
||||||
|
# Fix some hard coded paths to /bin/rm
|
||||||
|
sed -i -e "s|/bin/rm|rm|" lib/odbc/configure
|
||||||
|
sed -i -e "s|/bin/rm|rm|" erts/configure
|
||||||
|
|
||||||
|
./configure --prefix=$out --with-ssl=$openssl
|
||||||
|
make
|
||||||
|
make install
|
11
pkgs/development/interpreters/erlang/default.nix
Normal file
11
pkgs/development/interpreters/erlang/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{stdenv, fetchurl, perl, ncurses, gnum4, openssl}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "erlang-R11B-5";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
src = fetchurl {
|
||||||
|
url = http://www.erlang.org/download/otp_src_R11B-5.tar.gz;
|
||||||
|
md5 = "96acec41da87d6ee0ef18e1aab36ffdd";
|
||||||
|
};
|
||||||
|
inherit perl ncurses gnum4 openssl;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/oldtar/Pyrex-0.9.6.tar.gz;
|
url = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/oldtar/Pyrex-0.9.6.tar.gz;
|
||||||
|
@ -8,10 +8,11 @@ args : with args;
|
||||||
buildInputs = [python];
|
buildInputs = [python];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "Pyrex-"+version;
|
name = "Pyrex-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [installPythonPackage doForceShare]);
|
(textClosure localDefs [installPythonPackage doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Python package compiler or something like that.
|
Python package compiler or something like that.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src =
|
src =
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = ftp://ftp.fftw.org/pub/fftw/fftw-3.1.2.tar.gz;
|
url = ftp://ftp.fftw.org/pub/fftw/fftw-3.1.2.tar.gz;
|
||||||
|
@ -8,10 +8,11 @@ args : with args;
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
configureFlags = ["--enable-float --enable-shared"];
|
configureFlags = ["--enable-float --enable-shared"];
|
||||||
} null;
|
} null;
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "fftw-3.1.2";
|
name = "fftw-3.1.2";
|
||||||
builder = writeScript "fftw-3.1.2-builder"
|
builder = writeScript "fftw-3.1.2-builder"
|
||||||
(textClosure [doConfigure doMakeInstall doForceShare]);
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Fastest Fourier Transform in the West library.
|
Fastest Fourier Transform in the West library.
|
||||||
|
|
19
pkgs/development/libraries/glew/default.nix
Normal file
19
pkgs/development/libraries/glew/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
args:
|
||||||
|
args.stdenv.mkDerivation {
|
||||||
|
name = "glew-1.5.0";
|
||||||
|
|
||||||
|
src = args.fetchurl {
|
||||||
|
url = http://dfn.dl.sourceforge.net/sourceforge/glew/glew-1.5.0-src.tgz;
|
||||||
|
sha256 = "1kjr1fchnl785wsg11vzc03q3pm12lh20n1i593zr1xqfjgx2b4h";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs =(with args; [mesa x11 libXmu libXi]);
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "cross-platform open-source C/C++ extension loading library";
|
||||||
|
homepage = http://glew.sourceforge.net/;
|
||||||
|
license = ["BSD" "GLX" "SGI-B" "GPL2"]; # License description copied from gentoo-1.4.0
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase="GLEW_DEST=\$out make install";
|
||||||
|
}
|
11
pkgs/development/libraries/haskell/Crypto/default.nix
Normal file
11
pkgs/development/libraries/haskell/Crypto/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{cabal}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self : {
|
||||||
|
pname = "Crypto";
|
||||||
|
version = "4.1.0";
|
||||||
|
sha256 = "0984c833c5dfa6f4d56fd6fb284db7b7cef6676dc7999a1436aa856becba2b8f";
|
||||||
|
meta = {
|
||||||
|
description = "Several encryption algorithms for Haskell";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
13
pkgs/development/libraries/haskell/X11/default.nix
Normal file
13
pkgs/development/libraries/haskell/X11/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{cabal, libX11, xineramaSupport ? true, libXinerama ? null, libXext ? null}:
|
||||||
|
|
||||||
|
assert xineramaSupport -> (libXinerama != null && libXext != null);
|
||||||
|
|
||||||
|
cabal.mkDerivation (self : {
|
||||||
|
pname = "X11";
|
||||||
|
version = "1.4.1";
|
||||||
|
sha256 = "e51038541415686f0e278ccdbc0b2373cd11f212de99023b7b8f8e776aa09f79";
|
||||||
|
propagatedBuildInputs = [libX11] ++ (if xineramaSupport then [libXinerama libXext] else []);
|
||||||
|
meta = {
|
||||||
|
description = "A Haskell binding to the X11 graphics library";
|
||||||
|
};
|
||||||
|
})
|
11
pkgs/development/libraries/haskell/binary/default.nix
Normal file
11
pkgs/development/libraries/haskell/binary/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{cabal}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self : {
|
||||||
|
pname = "binary";
|
||||||
|
version = "0.4.1";
|
||||||
|
sha256 = "bb74824306843da25f6d97c271e2a06ee3a7e05fc529156fb81d7c576688e549";
|
||||||
|
meta = {
|
||||||
|
description = "Efficient, pure binary serialisation using lazy ByteStrings";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
95
pkgs/development/libraries/haskell/cabal/cabal.nix
Normal file
95
pkgs/development/libraries/haskell/cabal/cabal.nix
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
# generic builder for Cabal packages
|
||||||
|
|
||||||
|
attrs :
|
||||||
|
{
|
||||||
|
mkDerivation =
|
||||||
|
transform :
|
||||||
|
let dtransform =
|
||||||
|
self : {
|
||||||
|
|
||||||
|
# pname should be defined by the client to be the package basename
|
||||||
|
# version should be defined by the client to be the package version
|
||||||
|
|
||||||
|
# fname is the internal full name of the package
|
||||||
|
fname = "${self.pname}-${self.version}";
|
||||||
|
|
||||||
|
# name is the external full name of the package; usually we prefix
|
||||||
|
# all packages with haskell- to avoid name clashes for libraries;
|
||||||
|
# if that is not desired (for applications), name can be set to
|
||||||
|
# fname.
|
||||||
|
name = "haskell-${self.fname}";
|
||||||
|
|
||||||
|
# the default download location for Cabal packages is Hackage,
|
||||||
|
# you still have to specify the checksum
|
||||||
|
src = attrs.fetchurl {
|
||||||
|
url = "http://hackage.haskell.org/packages/archive/${self.pname}/${self.version}/${self.fname}.tar.gz";
|
||||||
|
inherit (self) sha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
# default buildInputs are just ghc, if more buildInputs are required
|
||||||
|
# buildInputs can be extended by the client by using extraBuildInputs,
|
||||||
|
# but often propagatedBuildInputs is preferable anyway
|
||||||
|
buildInputs = [attrs.ghc] ++ self.extraBuildInputs;
|
||||||
|
extraBuildInputs = [];
|
||||||
|
|
||||||
|
# we make sure that propagatedBuildInputs is defined, so that we don't
|
||||||
|
# have to check for its existence
|
||||||
|
propagatedBuildInputs = [];
|
||||||
|
|
||||||
|
# library directories that have to be added to the Cabal files
|
||||||
|
extraLibDirs = map (x : x + "/lib") self.propagatedBuildInputs;
|
||||||
|
|
||||||
|
# file(s) that have to be patched with information about extra libraries;
|
||||||
|
# can be redefined to the empty list by the client if this is not desired
|
||||||
|
patchLibFiles = [ "${self.pname}.cabal" ];
|
||||||
|
|
||||||
|
# patches files, compiles Setup, and configures
|
||||||
|
configurePhase = ''
|
||||||
|
eval "$preConfigure"
|
||||||
|
|
||||||
|
for i in ${toString self.patchLibFiles}; do
|
||||||
|
echo "patching $i"
|
||||||
|
test -f $i && sed -i '/extra-libraries/ { s|\( *\)extra-libraries.*|&\n\1extra-lib-dirs: ${toString self.extraLibDirs}| }' $i
|
||||||
|
done
|
||||||
|
for i in Setup.hs Setup.lhs; do
|
||||||
|
test -f $i && ghc --make $i
|
||||||
|
done
|
||||||
|
./Setup configure --verbose --prefix="$out"
|
||||||
|
|
||||||
|
eval "$postConfigure"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# builds via Cabal
|
||||||
|
buildPhase = ''
|
||||||
|
eval "$preBuild"
|
||||||
|
|
||||||
|
./Setup build
|
||||||
|
|
||||||
|
eval "$postBuild"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# installs via Cabal; creates a registration file for nix-support
|
||||||
|
# so that the package can be used in other Haskell-builds; also
|
||||||
|
# creates a register-${name}.sh in userspace that can be used to
|
||||||
|
# register the library in a user environment (but this scheme
|
||||||
|
# should sooner or later be deprecated in favour of using a
|
||||||
|
# ghc-wrapper).
|
||||||
|
installPhase = ''
|
||||||
|
eval "$preInstall"
|
||||||
|
|
||||||
|
./Setup copy
|
||||||
|
./Setup register --gen-script
|
||||||
|
mkdir -p $out/nix-support
|
||||||
|
if test -f register.sh; then
|
||||||
|
sed -i 's/|.*\(ghc-pkg update\)/| \1/' register.sh
|
||||||
|
cp register.sh $out/nix-support/register-ghclib.sh
|
||||||
|
sed -i 's/\(ghc-pkg update\)/\1 --user/' register.sh
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp register.sh $out/bin/register-${self.name}.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "$postInstall"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in attrs.stdenv.mkDerivation ((rec { f = dtransform f // transform f; }).f);
|
||||||
|
}
|
12
pkgs/development/libraries/haskell/pcre-light/default.nix
Normal file
12
pkgs/development/libraries/haskell/pcre-light/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{cabal, pcre}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self : {
|
||||||
|
pname = "pcre-light";
|
||||||
|
version = "0.3";
|
||||||
|
sha256 = "a8cfec1c265530388efbb187426368e280331d9829fa93d8f49f16db3c3e7794";
|
||||||
|
propagatedBuildInputs = [pcre];
|
||||||
|
meta = {
|
||||||
|
description = "A small, efficient and portable regex library for Perl 5 compatible regular expressions";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
source $stdenv/setup
|
|
||||||
|
|
||||||
|
|
||||||
tar xzf "$src" &&
|
|
||||||
cd uulib-* &&
|
|
||||||
|
|
||||||
|
|
||||||
autoconf &&
|
|
||||||
./configure --prefix=$out &&
|
|
||||||
|
|
||||||
|
|
||||||
ghc --make Setup.hs -o setup -package Cabal &&
|
|
||||||
./setup configure --prefix=$out --with-hc-pkg=ghc-pkg &&
|
|
||||||
|
|
||||||
|
|
||||||
./setup build &&
|
|
||||||
./setup install &&
|
|
||||||
./setup register --gen-script &&
|
|
||||||
|
|
||||||
mkdir -p $out/nix-support/ &&
|
|
||||||
cp register.sh $out/nix-support/register-ghclib.sh
|
|
|
@ -1,11 +0,0 @@
|
||||||
{stdenv, fetchurl, autoconf, ghc}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation
|
|
||||||
{
|
|
||||||
name = "uulib-0.9.2-ghc-6.6";
|
|
||||||
src = fetchurl { url = http://www.cs.uu.nl/~ariem/uulib-2006-10-30-src.tar.gz;
|
|
||||||
md5 = "d26059447d45fa91f54eca38680be7b7";
|
|
||||||
};
|
|
||||||
builder = ./builder.sh;
|
|
||||||
buildInputs = [ autoconf ghc ];
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
source $stdenv/setup
|
|
||||||
|
|
||||||
|
|
||||||
export HOME=$(pwd)/fake-home
|
|
||||||
|
|
||||||
|
|
||||||
#add ghc to search path
|
|
||||||
test -n "$ghc" && PATH=$PATH:$ghc/bin
|
|
||||||
|
|
||||||
#unpack
|
|
||||||
tar xzf "$src" &&
|
|
||||||
cd uulib-* &&
|
|
||||||
|
|
||||||
#configure
|
|
||||||
ghc --make Setup.hs -o setup -package Cabal &&
|
|
||||||
./setup configure --prefix=$out &&
|
|
||||||
|
|
||||||
#make
|
|
||||||
./setup build &&
|
|
||||||
|
|
||||||
#install
|
|
||||||
./setup copy &&
|
|
||||||
|
|
||||||
# Create package database. If we can find the ghc version we might install the
|
|
||||||
# package, like ghc does, in $out/lib/ghc-version/package.conf.
|
|
||||||
|
|
||||||
support=$out/nix-support &&
|
|
||||||
packages_db=$out/nix-support/package.conf &&
|
|
||||||
|
|
||||||
mkdir $support &&
|
|
||||||
cp $ghc/lib/ghc-*/package.conf $packages_db &&
|
|
||||||
chmod +w $packages_db &&
|
|
||||||
#echo '[]' > $packages_db &&
|
|
||||||
|
|
||||||
# We save a modified version of a register script. This gives a dependency on
|
|
||||||
# ghc, but this should not be a problem as long as $out is a static library.
|
|
||||||
|
|
||||||
./setup register --gen-script &&
|
|
||||||
sed '/ghc-pkg/ s|update -|-f "$1" update -|' register.sh > register-pkg.sh &&
|
|
||||||
sed '/ghc-pkg/ s|--auto-ghci-libs||' register-pkg.sh > $support/register.sh &&
|
|
||||||
|
|
||||||
# The package and its direct cabal dependencies are registered. This may result
|
|
||||||
# in duplicate registrations attempts but hopefully that will not result in
|
|
||||||
# errors.
|
|
||||||
|
|
||||||
# uulib has no dependencies on other ghc libraries
|
|
||||||
for dep in ; do
|
|
||||||
sh $dep/nix-support/register.sh $packages_db || exit 1
|
|
||||||
done &&
|
|
||||||
sh register-pkg.sh $packages_db &&
|
|
||||||
rm -f $package_db.old
|
|
|
@ -1,12 +1,10 @@
|
||||||
{stdenv, fetchurl, ghc}:
|
{cabal}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
cabal.mkDerivation (self : {
|
||||||
name = "uulib-0.9.2";
|
pname = "uulib";
|
||||||
src = fetchurl {
|
version = "0.9.5";
|
||||||
url = http://nix.cs.uu.nl/dist/tarballs/uulib-0.9.2-src.tar.gz;
|
sha256 = "38415725133af464de582dadc7d7e60b1aeb96344b18b239d176bf2181f98563";
|
||||||
md5 = "0cc9acc6a268e2bc5c8a954e67406e2d";
|
meta = {
|
||||||
|
description = "Fast Parser Combinators and Pretty Printing Combinators";
|
||||||
};
|
};
|
||||||
builder = ./builder.sh;
|
})
|
||||||
#buildInputs = [ ghc ];
|
|
||||||
inherit ghc;
|
|
||||||
}
|
|
||||||
|
|
13
pkgs/development/libraries/haskell/vty/default.nix
Normal file
13
pkgs/development/libraries/haskell/vty/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{cabal}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self : {
|
||||||
|
pname = "vty";
|
||||||
|
version = "3.0.0";
|
||||||
|
sha256 = "44ae53d06b8b45c14cd3861e860a38730ed9995ed56b1b3d9aba6641771f1947";
|
||||||
|
meta = {
|
||||||
|
description = "vty is a *very* simplistic library in the niche of ncurses";
|
||||||
|
};
|
||||||
|
preConfigure = ''
|
||||||
|
sed -i 's|^Build-Depends:.*$|&, bytestring, containers|' ${self.pname}.cabal
|
||||||
|
'';
|
||||||
|
})
|
11
pkgs/development/libraries/haskell/zlib/default.nix
Normal file
11
pkgs/development/libraries/haskell/zlib/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{cabal, zlib}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self : {
|
||||||
|
pname = "zlib";
|
||||||
|
version = "0.4.0.2";
|
||||||
|
sha256 = "e6e9e51ca5b7f1685eb031f826f7865acc10cc2c8d0dfad975e0e81fd17f17ed";
|
||||||
|
propagatedBuildInputs = [zlib];
|
||||||
|
meta = {
|
||||||
|
description = "Compression and decompression in the gzip and zlib formats";
|
||||||
|
};
|
||||||
|
})
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = mirror://sourceforge/libdbi-drivers/libdbi-drivers-0.8.2-1.tar.gz;
|
url = mirror://sourceforge/libdbi-drivers/libdbi-drivers-0.8.2-1.tar.gz;
|
||||||
|
@ -27,10 +27,11 @@ args : with args;
|
||||||
] else [])
|
] else [])
|
||||||
;
|
;
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libdbi"+version;
|
name = "libdbi"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
DB independent interface to DB; DB drivers (mysql only for now).
|
DB independent interface to DB; DB drivers (mysql only for now).
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = mirror://sourceforge/libdbi/libdbi-0.8.2.tar.gz;
|
url = mirror://sourceforge/libdbi/libdbi-0.8.2.tar.gz;
|
||||||
|
@ -9,10 +9,11 @@ args : with args;
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libdbi"+version;
|
name = "libdbi"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
DB independent interface to DB.
|
DB independent interface to DB.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://gnunet.org/libextractor/download/libextractor-0.5.18.tar.gz;
|
url = http://gnunet.org/libextractor/download/libextractor-0.5.18.tar.gz;
|
||||||
|
@ -9,10 +9,11 @@ args : with args;
|
||||||
buildInputs = [ zlib];
|
buildInputs = [ zlib];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libextractor"+version;
|
name = "libextractor"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Libextractor - extracts metadata from files.
|
Libextractor - extracts metadata from files.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{stdenv, fetchurl, python}:
|
{stdenv, fetchurl, python}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "ZopeInterface-3.1.0c1";
|
name = "ZopeInterface-3.3.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.zope.org/Products/ZopeInterface/3.1.0c1/ZopeInterface-3.1.0c1.tgz;
|
url = http://www.zope.org/Products/ZopeInterface/3.3.0/zope.interface-3.3.0.tar.gz;
|
||||||
md5 = "f34cb95f2fbdbe3f1850c95cefddbd2c";
|
sha256 = "0xahg9cmagn4j3dbifvgzbjliw2jdrbf27fhqwkdp8j80xpyyjf0";
|
||||||
};
|
};
|
||||||
buildInputs = [python];
|
buildInputs = [python];
|
||||||
buildPhase = "true";
|
buildPhase = "true";
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{stdenv, fetchurl, python, ZopeInterface}:
|
{stdenv, fetchurl, python, ZopeInterface}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "twisted-2.4.0";
|
name = "twisted-2.5.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/Twisted-2.4.0.tar.bz2;
|
url = http://tmrc.mit.edu/mirror/twisted/Twisted/2.5/Twisted-2.5.0.tar.bz2;
|
||||||
md5 = "42eb0c8fd0f8707a39fff1dd6adab27d";
|
sha256 = "1kfj4354lm4kphm317giyldykyd17lba2xd7y512lxc38hzxzcpk";
|
||||||
};
|
};
|
||||||
buildInputs = [python];
|
buildInputs = [python];
|
||||||
propagatedBuildInputs = [ZopeInterface];
|
propagatedBuildInputs = [ZopeInterface];
|
||||||
|
|
11
pkgs/development/tools/documentation/haddock/default.nix
Normal file
11
pkgs/development/tools/documentation/haddock/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{cabal}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self : {
|
||||||
|
pname = "haddock";
|
||||||
|
version = "2.0.0.0";
|
||||||
|
name = self.fname;
|
||||||
|
sha256 = "a2ea5bdc127bc8b189a8d869f582ec774fea0933e7f5ca89549a6c142b9993df";
|
||||||
|
meta = {
|
||||||
|
description = "a tool for automatically generating documentation from annotated Haskell source code";
|
||||||
|
};
|
||||||
|
})
|
|
@ -1,14 +1,12 @@
|
||||||
{stdenv, fetchurl, ghc, uulib}:
|
{cabal, uulib}:
|
||||||
|
|
||||||
stdenv.mkDerivation
|
cabal.mkDerivation (self : {
|
||||||
{
|
pname = "uuagc";
|
||||||
name = "uuagc-0.9.2";
|
version = "0.9.5";
|
||||||
|
name = self.fname;
|
||||||
src = fetchurl { url = http://www.cs.uu.nl/~ariem/uuagc-0.9.2-src.tar.gz;
|
sha256 = "c5be435efa609f72c09e175dd5cf7835a060bd7eaf6634ec4cde72ea84b99f25";
|
||||||
md5 = "cbac92287c9c0a858ccbfa37615d9f5f";
|
extraBuildInputs = [uulib];
|
||||||
};
|
meta = {
|
||||||
|
description = "Attribute Grammar System of Universiteit Utrecht";
|
||||||
buildInputs = [ghc uulib];
|
};
|
||||||
|
})
|
||||||
meta = { description = "The UUAG Compiler"; };
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = ftp://ftp.gnu.org/gnu/indent/indent-2.2.9.tar.gz;
|
url = ftp://ftp.gnu.org/gnu/indent/indent-2.2.9.tar.gz;
|
||||||
|
@ -9,6 +9,7 @@ args : with args;
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
preBuild = FullDepEntry ("
|
preBuild = FullDepEntry ("
|
||||||
sed -e '/extern FILE [*]output/i#ifndef OUTPUT_DEFINED_ELSEWHERE' -i src/indent.h
|
sed -e '/extern FILE [*]output/i#ifndef OUTPUT_DEFINED_ELSEWHERE' -i src/indent.h
|
||||||
|
@ -19,7 +20,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "indent";
|
name = "indent";
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure preBuild doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doConfigure preBuild doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
GNU Indent - a source text formatter.
|
GNU Indent - a source text formatter.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://ftp.gnome.org/pub/gnome/sources/intltool/0.36/intltool-0.36.2.tar.bz2;
|
url = http://ftp.gnome.org/pub/gnome/sources/intltool/0.36/intltool-0.36.2.tar.bz2;
|
||||||
|
@ -9,10 +9,11 @@ args : with args;
|
||||||
propagatedBuildInputs = [perl perlXMLParser];
|
propagatedBuildInputs = [perl perlXMLParser];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "intltool-0.36.2";
|
name = "intltool-0.36.2";
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall doPropagate doForceShare]);
|
(textClosure localDefs [doConfigure doMakeInstall doPropagate doForceShare]);
|
||||||
inherit propagatedBuildInputs;
|
inherit propagatedBuildInputs;
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.orig.tar.gz;
|
url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.orig.tar.gz;
|
||||||
|
@ -12,6 +12,7 @@ args : with args;
|
||||||
cd ltrace-*;
|
cd ltrace-*;
|
||||||
";
|
";
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
preConfigure = FullDepEntry ("
|
preConfigure = FullDepEntry ("
|
||||||
sed -e 's@-o root -g root@@' -i Makefile.in;
|
sed -e 's@-o root -g root@@' -i Makefile.in;
|
||||||
|
@ -20,7 +21,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ltrace-0.5";
|
name = "ltrace-0.5";
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [preConfigure doConfigure doMakeInstall doForceShare]);
|
(textClosure localDefs [preConfigure doConfigure doMakeInstall doForceShare]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Library call tracer.
|
Library call tracer.
|
||||||
|
|
|
@ -1,23 +1,12 @@
|
||||||
{stdenv, fetchurl, ghc, perl}:
|
{cabal, perl}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
cabal.mkDerivation (self : {
|
||||||
name = "alex-2.1.0";
|
pname = "alex";
|
||||||
src = fetchurl {
|
version = "2.2";
|
||||||
url = http://www.haskell.org/alex/dist/2.1.0/alex-2.1.0.tar.gz;
|
name = self.fname;
|
||||||
sha1 = "37599b7be5249d639b3a5a3fdc61907dc4dad660";
|
sha256 = "e958d4fc6cfdb1d351dc39a45ea882f23b1b1773a736d43814a52d4939a41ffe";
|
||||||
|
extraBuildInputs = [perl];
|
||||||
|
meta = {
|
||||||
|
description = "A lexical analyser generator for Haskell";
|
||||||
};
|
};
|
||||||
buildInputs = [ghc perl];
|
})
|
||||||
|
|
||||||
configurePhase = "
|
|
||||||
ghc --make Setup.lhs
|
|
||||||
./Setup configure --prefix=\"\${out}\"
|
|
||||||
";
|
|
||||||
|
|
||||||
buildPhase = "
|
|
||||||
./Setup build
|
|
||||||
";
|
|
||||||
|
|
||||||
installPhase = "
|
|
||||||
./Setup install
|
|
||||||
";
|
|
||||||
}
|
|
||||||
|
|
12
pkgs/development/tools/parsing/happy/happy-1.17.nix
Normal file
12
pkgs/development/tools/parsing/happy/happy-1.17.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{cabal, perl}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self : {
|
||||||
|
|
||||||
|
# requires cabal-1.2 (and therefore, in Nix, currently ghc-6.8)
|
||||||
|
|
||||||
|
pname = "happy";
|
||||||
|
version = "1.17";
|
||||||
|
name = self.fname;
|
||||||
|
sha256 = "dca4e47d17e5d538335496236b3d2c3cbff644cf7380c987a4714e7784c70a2b";
|
||||||
|
extraBuildInputs = [perl];
|
||||||
|
})
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://savannah.nongnu.org/download/construo/construo-0.2.2.tar.gz;
|
url = http://savannah.nongnu.org/download/construo/construo-0.2.2.tar.gz;
|
||||||
|
@ -11,6 +11,7 @@ args : with args;
|
||||||
;
|
;
|
||||||
configureFlags = [""];
|
configureFlags = [""];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
preConfigure = FullDepEntry ("
|
preConfigure = FullDepEntry ("
|
||||||
sed -e 's/math[.]h/cmath/' -i vector.cxx
|
sed -e 's/math[.]h/cmath/' -i vector.cxx
|
||||||
|
@ -20,7 +21,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "construo-"+version;
|
name = "construo-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Construo masses and springs simulation.
|
Construo masses and springs simulation.
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
args: with args;
|
args: with args;
|
||||||
with (builderDefs
|
let localDefs = builderDefs {
|
||||||
{
|
|
||||||
buildInputs =[(wxGTK null)];
|
buildInputs =[(wxGTK null)];
|
||||||
src =
|
src =
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://www.piettes.com/fallingsandgame/fsg-src-4.4.tar.gz;
|
url = http://www.piettes.com/fallingsandgame/fsg-src-4.4.tar.gz;
|
||||||
sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c";
|
sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c";
|
||||||
};
|
};
|
||||||
} null);
|
} null;
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
preBuild = FullDepEntry "
|
preBuild = FullDepEntry "
|
||||||
sed -e '
|
sed -e '
|
||||||
|
@ -25,7 +25,7 @@ in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "fsg-4.4";
|
name = "fsg-4.4";
|
||||||
builder = writeScript "fsg-4.4-builder"
|
builder = writeScript "fsg-4.4-builder"
|
||||||
(textClosure [doUnpack addInputs preBuild doMake installPhase doForceShare]);
|
(textClosure localDefs [doUnpack addInputs preBuild doMake installPhase doForceShare]);
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
|
|
43
pkgs/games/orbit/1.01.nix
Normal file
43
pkgs/games/orbit/1.01.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
args : with args; with builderDefs {src="";} null;
|
||||||
|
let localDefs = builderDefs rec {
|
||||||
|
src = /* put a fetchurl here */
|
||||||
|
fetchurl {
|
||||||
|
sha256 = "1kx69f9jqnfzwjh47cl1df8p8hn3bnp6bznxnb6c4wx32ijn5gri";
|
||||||
|
url = http://ftp.de.debian.org/debian/pool/main/s/space-orbit/space-orbit_1.01.orig.tar.gz;
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [mesa libXi libXt libXext libX11 libXmu freeglut esound];
|
||||||
|
configureFlags = [];
|
||||||
|
debianPatch =
|
||||||
|
fetchurl {
|
||||||
|
url = http://ftp.de.debian.org/debian/pool/main/s/space-orbit/space-orbit_1.01-9.diff.gz;
|
||||||
|
sha256 = "1v3s97day6fhv08l2rn81waiprhi1lfyjjsj55axfh6n6zqfn1w2";
|
||||||
|
};
|
||||||
|
customBuild = FullDepEntry (''
|
||||||
|
gunzip < ${debianPatch} | patch -Np1
|
||||||
|
cd src
|
||||||
|
sed -e 's@/usr/share/games/orbit/@'$out'/dump/@g' -i *.c
|
||||||
|
sed -e '/DIR=/d' -i Makefile
|
||||||
|
make
|
||||||
|
ensureDir $out/bin
|
||||||
|
cp -r .. $out/dump
|
||||||
|
cat >$out/bin/space-orbit <<EOF
|
||||||
|
#! /bin/sh
|
||||||
|
$out/dump/orbit "\$@"
|
||||||
|
EOF
|
||||||
|
chmod a+x $out/bin/space-orbit
|
||||||
|
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];
|
||||||
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "space-orbit-"+version;
|
||||||
|
builder = writeScript (name + "-builder")
|
||||||
|
(textClosure localDefs
|
||||||
|
[ customBuild doForceShare doPropagate]);
|
||||||
|
meta = {
|
||||||
|
description = "
|
||||||
|
Orbit space flight simulator.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (builtins)
|
inherit (builtins)
|
||||||
head tail isList stringLength substring lessThan sub;
|
head tail isList stringLength substring lessThan sub
|
||||||
|
listToAttrs attrNames hasAttr;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -15,11 +16,15 @@ rec {
|
||||||
id = x: x;
|
id = x: x;
|
||||||
|
|
||||||
|
|
||||||
# !!! need documentation...
|
# accumulates / merges all attr sets until null is fed.
|
||||||
|
# example: sumArgs id { a = 'a'; x = 'x'; } { y = 'y'; x = 'X'; } null
|
||||||
|
# result : { a = 'a'; x = 'X'; y = 'Y'; }
|
||||||
innerSumArgs = f : x : y : (if y == null then (f x)
|
innerSumArgs = f : x : y : (if y == null then (f x)
|
||||||
else (innerSumArgs f (x // y)));
|
else (innerSumArgs f (x // y)));
|
||||||
sumArgs = f : innerSumArgs f {};
|
sumArgs = f : innerSumArgs f {};
|
||||||
|
|
||||||
|
# example a = pairMap (x : y : x + y) ["a" "b" "c" "d"];
|
||||||
|
# result: ["ab" "cd"]
|
||||||
innerPairMap = acc: f: l:
|
innerPairMap = acc: f: l:
|
||||||
if l == [] then acc else
|
if l == [] then acc else
|
||||||
innerPairMap (acc ++ [(f (head l)(head (tail l)))])
|
innerPairMap (acc ++ [(f (head l)(head (tail l)))])
|
||||||
|
@ -55,6 +60,7 @@ rec {
|
||||||
else [(head list) separator]
|
else [(head list) separator]
|
||||||
++ (intersperse separator (tail list));
|
++ (intersperse separator (tail list));
|
||||||
|
|
||||||
|
toList = x : if (__isList x) then x else [x];
|
||||||
|
|
||||||
concatStringsSep = separator: list:
|
concatStringsSep = separator: list:
|
||||||
concatStrings (intersperse separator list);
|
concatStrings (intersperse separator list);
|
||||||
|
@ -72,6 +78,7 @@ rec {
|
||||||
# Return an attribute from nested attribute sets. For instance ["x"
|
# Return an attribute from nested attribute sets. For instance ["x"
|
||||||
# "y"] applied to some set e returns e.x.y, if it exists. The
|
# "y"] applied to some set e returns e.x.y, if it exists. The
|
||||||
# default value is returned otherwise.
|
# default value is returned otherwise.
|
||||||
|
# comment: there is also builtins.getAttr ? (is there a better name for this function?)
|
||||||
getAttr = attrPath: default: e:
|
getAttr = attrPath: default: e:
|
||||||
let attr = head attrPath;
|
let attr = head attrPath;
|
||||||
in
|
in
|
||||||
|
@ -116,6 +123,12 @@ rec {
|
||||||
else if pred (head list) then all pred (tail list)
|
else if pred (head list) then all pred (tail list)
|
||||||
else false;
|
else false;
|
||||||
|
|
||||||
|
# much shorter implementations using map and fold (are lazy as well)
|
||||||
|
# which ones are better?
|
||||||
|
# true if all/ at least one element(s) satisfy f
|
||||||
|
# all = f : l : fold logicalAND true (map f l);
|
||||||
|
# any = f : l : fold logicalOR false (map f l);
|
||||||
|
|
||||||
|
|
||||||
# Return true if each element of a list is equal, false otherwise.
|
# Return true if each element of a list is equal, false otherwise.
|
||||||
eqLists = xs: ys:
|
eqLists = xs: ys:
|
||||||
|
@ -246,8 +259,6 @@ rec {
|
||||||
checker
|
checker
|
||||||
else condConcat
|
else condConcat
|
||||||
name (tail (tail list)) checker;
|
name (tail (tail list)) checker;
|
||||||
|
|
||||||
|
|
||||||
/* Options. */
|
/* Options. */
|
||||||
|
|
||||||
mkOption = attrs: attrs // {_type = "option";};
|
mkOption = attrs: attrs // {_type = "option";};
|
||||||
|
@ -305,4 +316,275 @@ rec {
|
||||||
|
|
||||||
closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);});
|
closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);});
|
||||||
|
|
||||||
|
# calls a function (f attr value ) for each record item. returns a list
|
||||||
|
mapRecordFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r);
|
||||||
|
|
||||||
|
# to be used with listToAttrs (_a_ttribute _v_alue)
|
||||||
|
# TODO should be renamed to nv because niksnut has renamed the attribute attr to name
|
||||||
|
nv = name : value : { inherit name value; };
|
||||||
|
# attribute set containing one attribute
|
||||||
|
nvs = name : value : listToAttrs [ (nv name value) ];
|
||||||
|
# adds / replaces an attribute of an attribute set
|
||||||
|
setAttr = set : name : v : set // (nvs name v);
|
||||||
|
|
||||||
|
# iterates over a list of attributes collecting the attribute attr if it exists
|
||||||
|
catAttrs = attr : l : fold ( s : l : if (hasAttr attr s) then [(builtins.getAttr attr s)] ++ l else l) [] l;
|
||||||
|
|
||||||
|
mergeAttrs = fold ( x : y : x // y) {};
|
||||||
|
|
||||||
|
# Using f = a : b = b the result is similar to //
|
||||||
|
# merge attributes with custom function handling the case that the attribute
|
||||||
|
# exists in both sets
|
||||||
|
mergeAttrsWithFunc = f : set1 : set2 :
|
||||||
|
fold (n: set : if (__hasAttr n set)
|
||||||
|
then setAttr set n (f (__getAttr n set) (__getAttr n set2))
|
||||||
|
else set )
|
||||||
|
set1 (__attrNames set2);
|
||||||
|
|
||||||
|
# merging two attribute set concatenating the values of same attribute names
|
||||||
|
# eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; }
|
||||||
|
mergeAttrsConcatenateValues = mergeAttrsWithFunc ( a : b : (toList a) ++ (toList b) );
|
||||||
|
|
||||||
|
# returns atribute values as a list
|
||||||
|
flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set);
|
||||||
|
mapIf = cond : f : fold ( x : l : if (cond x) then [(f x)] ++ l else l) [];
|
||||||
|
|
||||||
|
# Marc 2nd proposal: (not everything has been tested in detail yet..)
|
||||||
|
|
||||||
|
# usage / example
|
||||||
|
# flagConfig = {
|
||||||
|
# } // (enableDisableFeature "flagName" "configure_feature" extraAttrs;)
|
||||||
|
#
|
||||||
|
# is equal to
|
||||||
|
# flagConfig = {
|
||||||
|
# flagName = { cfgOption = "--enable-configure_feature"; } // extraAttrs;
|
||||||
|
# no_flagName = { cfgOption = "--disable-configure_feature"; };
|
||||||
|
enableDisableFeature = flagName : configure_feature : extraAttrs :
|
||||||
|
listToAttrs [ ( nv flagName ({ cfgOption = "--enable-${configure_feature}"; } // extraAttrs ) )
|
||||||
|
( nv "no_${flagName}" ({ cfgOption = "--disable-${configure_feature}"; } ) )];
|
||||||
|
|
||||||
|
# calls chooseOptionsByFlags2 with some preprocessing
|
||||||
|
# chooseOptionsByFlags2 returns an attribute set meant to be used to create new derivaitons.
|
||||||
|
# see mkDerivationByConfiguration in all-packages.nix and the examples given below.
|
||||||
|
# You can just copy paste them into all-packages.nix to test them..
|
||||||
|
|
||||||
|
chooseOptionsByFlags = { flagConfig, args, optionals ? [], defaults ? [],
|
||||||
|
collectExtraPhaseActions ? [] } :
|
||||||
|
let passedOptionals = filter ( x : hasAttr x args ) optionals; # these are in optionals and in args
|
||||||
|
# we simply merge in <optional_name> = { buildInputs = <arg.<optional_name>; pass = <arg.optional_name>; }
|
||||||
|
flagConfigWithOptionals = flagConfig // ( listToAttrs
|
||||||
|
(map ( o : nv o ( { buildInputs = o; pass = nvs o (builtins.getAttr o args); }
|
||||||
|
// getAttr [o] {} flagConfig )
|
||||||
|
)
|
||||||
|
passedOptionals ) );
|
||||||
|
|
||||||
|
in chooseOptionsByFlags2 flagConfigWithOptionals collectExtraPhaseActions args
|
||||||
|
( (getAttr ["flags"] defaults args) ++ passedOptionals);
|
||||||
|
|
||||||
|
chooseOptionsByFlags2 = flagConfig : collectExtraPhaseActions : args : flags :
|
||||||
|
let
|
||||||
|
# helper function
|
||||||
|
collectFlags = # state : flags :
|
||||||
|
fold ( flag : s : (
|
||||||
|
if (hasAttr flag s.result) then s # this state has already been visited
|
||||||
|
else if (! hasAttr flag flagConfig) then throw "unkown flag `${flag}' specified"
|
||||||
|
else let fDesc = (builtins.getAttr flag flagConfig);
|
||||||
|
implied = flatten ( getAttr ["implies"] [] fDesc );
|
||||||
|
blocked = flatten ( getAttr ["blocks"] [] fDesc );
|
||||||
|
# add this flag
|
||||||
|
s2 = s // { result = ( setAttr s.result flag (builtins.getAttr flag flagConfig) );
|
||||||
|
blockedFlagsBy = s.blockedFlagsBy
|
||||||
|
// listToAttrs (map (b: nv b flag ) blocked); };
|
||||||
|
# add implied flags
|
||||||
|
in collectFlags s2 implied
|
||||||
|
));
|
||||||
|
|
||||||
|
# chosen contains flagConfig but only having those attributes elected by flags
|
||||||
|
# (or by implies attributes of elected attributes)
|
||||||
|
options = let stateOpts = collectFlags { blockedFlagsBy = {}; result = {}; }
|
||||||
|
(flags ++ ( if (hasAttr "mandatory" flagConfig) then ["mandatory"] else [] ));
|
||||||
|
# these options have not been chosen (neither by flags nor by implies)
|
||||||
|
unsetOptions = filter ( x : (! hasAttr x stateOpts.result) && (hasAttr ("no_"+x) flagConfig))
|
||||||
|
( attrNames flagConfig );
|
||||||
|
# no add the corresponding no_ attributes as well ..
|
||||||
|
state = collectFlags stateOpts (map ( x : "no_" + x ) unsetOptions);
|
||||||
|
in # check for blockings:
|
||||||
|
assert ( all id ( map ( b: if (hasAttr b state.result)
|
||||||
|
then throw "flag ${b} is blocked by flag ${__getAttr b state.blockedFlagsBy}"
|
||||||
|
else true )
|
||||||
|
(attrNames state.blockedFlagsBy) ) );
|
||||||
|
state.result;
|
||||||
|
flatOptions = flattenAttrs options;
|
||||||
|
|
||||||
|
# helper functions :
|
||||||
|
collectAttrs = attr : catAttrs attr flatOptions;
|
||||||
|
optsConcatStrs = delimiter : attrs : concatStrings
|
||||||
|
( intersperse delimiter (flatten ( collectAttrs attrs ) ) );
|
||||||
|
|
||||||
|
ifStringGetArg = x : if (__isAttrs x) then x # ( TODO implement __isString ?)
|
||||||
|
else nvs x (__getAttr x args);
|
||||||
|
|
||||||
|
in assert ( all id ( mapRecordFlatten ( attr : r : if ( all id ( flatten (getAttr ["assertion"] [] r ) ) )
|
||||||
|
then true else throw "assertion failed flag ${attr}" )
|
||||||
|
options) );
|
||||||
|
( rec {
|
||||||
|
|
||||||
|
#foldOptions = attr: f : start: fold f start (catAttrs attr flatOptions);
|
||||||
|
|
||||||
|
# compared to flags flagsSet does also contain the implied flags.. This makes it easy to write assertions. ( assert args.
|
||||||
|
inherit options flatOptions collectAttrs optsConcatStrs;
|
||||||
|
|
||||||
|
buildInputs = map ( attr: if (! hasAttr attr args) then throw "argument ${attr} is missing!" else (builtins.getAttr attr args) )
|
||||||
|
(flatten (catAttrs "buildInputs" flatOptions));
|
||||||
|
propagatedBuildInputs = map ( attr: if (! hasAttr attr args) then throw "argument ${attr} is missing!" else (builtins.getAttr attr args) )
|
||||||
|
(flatten (catAttrs "propagatedBuildInputs" flatOptions));
|
||||||
|
|
||||||
|
configureFlags = optsConcatStrs " " "cfgOption";
|
||||||
|
|
||||||
|
#flags = listToAttrs (map ( flag: nv flag (hasAttr flag options) ) (attrNames flagConfig) );
|
||||||
|
flags_prefixed = listToAttrs (map ( flag: nv ("flag_set_"+flag) (hasAttr flag options) ) (attrNames flagConfig) );
|
||||||
|
|
||||||
|
pass = mergeAttrs ( map ifStringGetArg ( flatten (collectAttrs "pass") ) );
|
||||||
|
} # now add additional phase actions (see examples)
|
||||||
|
// listToAttrs ( map ( x : nv x (optsConcatStrs "\n" x) ) collectExtraPhaseActions ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO: Perhaps it's better to move this documentation / these tests into some extra packages ..
|
||||||
|
|
||||||
|
# ###########################################################################
|
||||||
|
# configuration tutorial .. examples and tests..
|
||||||
|
# Copy this into all-packages.nix and try
|
||||||
|
|
||||||
|
# The following derviations will all fail..
|
||||||
|
# But they will print the passed options so that you can get to know
|
||||||
|
# how these configurations ought to work.
|
||||||
|
# TODO: There is no nice way to pass an otpion yet.
|
||||||
|
# I could imagine something like
|
||||||
|
# flags = [ "flagA" "flagB" { flagC = 4; } ];
|
||||||
|
|
||||||
|
# They are named:
|
||||||
|
# simpleYes, simpleNo,
|
||||||
|
# defaultsimpleYes, defaultsimpleNo
|
||||||
|
# optionalssimpleYes, optionalssimpleNo
|
||||||
|
# bitingsimpleYes can only be ran with -iA blockingBiteMonster
|
||||||
|
# assertionsimpleNo
|
||||||
|
# of course you can use -iA and the attribute name as well to select these examples
|
||||||
|
|
||||||
|
# dummy build input
|
||||||
|
whoGetsTheFlagFirst = gnused;
|
||||||
|
whoGetsTheFlagLast = gnumake;
|
||||||
|
|
||||||
|
# simple example demonstrating containing one flag.
|
||||||
|
# features:
|
||||||
|
# * configure options are passed automatically
|
||||||
|
# * buildInputs are collected (they are special, see the setup script)
|
||||||
|
# * they can be passed by additional name as well using pass = { inherit (args) python }
|
||||||
|
# ( or short (value not attrs) : pass = "python" )
|
||||||
|
# * an attribute named the same way as the flag is added indicating
|
||||||
|
# true/ false (flag has been set/ not set)
|
||||||
|
# * extra phase dependend commands can be added
|
||||||
|
# Its easy to add your own stuff using co.collectAttrs or co.optsConcatStrs
|
||||||
|
# ( perhaps this name will change?)
|
||||||
|
simpleFlagYesNoF = namePrefix : extraFlagAttrs : mkDerivationByConfiguration ( {
|
||||||
|
flagConfig = {
|
||||||
|
flag = { name = namePrefix + "simpleYes";
|
||||||
|
cfgOption = [ "--Yes" "--you-dont-need-a-list" ];
|
||||||
|
buildInputs = [ "whoGetsTheFlagFirst" ];
|
||||||
|
pass = { inherit gnumake; };
|
||||||
|
extraConfigureCmd = "echo Hello, it worked! ";
|
||||||
|
blocks = "bitingMonster";
|
||||||
|
};
|
||||||
|
no_flag = { name = namePrefix + "simpleNo";
|
||||||
|
cfgOption = "--no";
|
||||||
|
implies = ["bitingMonster"];
|
||||||
|
};
|
||||||
|
bitingMonster = {
|
||||||
|
extraConfigureCmd = "echo Ill bite you";
|
||||||
|
};
|
||||||
|
gnutar = { cfgOption="--with-gnutar";
|
||||||
|
# buildInputs and pass will be added automatically if gnutar is added to optionals
|
||||||
|
};
|
||||||
|
# can be used to check configure options of dependencies
|
||||||
|
# eg testFlag = { assertion = [ arg.desktop.flag_set_wmii (! arg.desktop.flag_set_gnome) (! arg.desktops.flag_set_kde ]; }
|
||||||
|
assertionFlag = { assertion = false; }; # assert is nix language keyword
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
collectExtraPhaseActions = [ "extraConfigureCmd" ];
|
||||||
|
|
||||||
|
extraAttrs = co : {
|
||||||
|
name = ( __head (co.collectAttrs "name") );
|
||||||
|
|
||||||
|
unpackPhase = "
|
||||||
|
echo my name is
|
||||||
|
echo \$name
|
||||||
|
echo
|
||||||
|
echo flag given \\(should be 1 or empty string\\) ?
|
||||||
|
echo \$flag_set_flag
|
||||||
|
echo
|
||||||
|
echo my build inputs are
|
||||||
|
echo \$buildInputs
|
||||||
|
echo
|
||||||
|
echo my configuration flags are
|
||||||
|
echo \$configureFlags
|
||||||
|
echo
|
||||||
|
echo what about gnumake? Did it pass?
|
||||||
|
echo \$gnumake
|
||||||
|
echo
|
||||||
|
echo configurePhase command is
|
||||||
|
echo $\configurePhase
|
||||||
|
echo
|
||||||
|
echo gnutar passed? \\(optional test\\)
|
||||||
|
echo \$gnutar
|
||||||
|
echo
|
||||||
|
echo dying now
|
||||||
|
echo die_Hopefully_Soon
|
||||||
|
";
|
||||||
|
configurePhase = co.extraConfigureCmd;
|
||||||
|
};
|
||||||
|
} // extraFlagAttrs );
|
||||||
|
|
||||||
|
|
||||||
|
simpleYes = simpleFlagYesNoF "" {} {
|
||||||
|
inherit whoGetsTheFlagFirst lib stdenv;
|
||||||
|
flags = ["flag"];
|
||||||
|
};
|
||||||
|
# note the "I'll bite you" because of the implies attribute
|
||||||
|
simpleNo = simpleFlagYesNoF "" {} {
|
||||||
|
inherit whoGetsTheFlagFirst lib stdenv;
|
||||||
|
flags = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
# specifying defaults by adding a default attribute
|
||||||
|
|
||||||
|
yesAgainDefault = simpleFlagYesNoF "default" { defaults = [ "flag" ];} {
|
||||||
|
inherit whoGetsTheFlagFirst lib stdenv;
|
||||||
|
};
|
||||||
|
noAgainOverridingDefault = simpleFlagYesNoF "default" { defaults = [ "flag" ];} {
|
||||||
|
inherit whoGetsTheFlagFirst lib stdenv;
|
||||||
|
flags = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
# requested by Michael Raskin: activate flag automatically if dependency is passed:
|
||||||
|
withGnutarOptional = simpleFlagYesNoF "optionals" { optionals = [ "gnutar" ];} {
|
||||||
|
flags = [ "flag" ]; # I only need to pass this to trigger name optionalssimpleYes
|
||||||
|
inherit whoGetsTheFlagFirst lib stdenv;
|
||||||
|
inherit gnutar;
|
||||||
|
};
|
||||||
|
withoutGnutarOptional = simpleFlagYesNoF "optionals" { optionals = [ "gnutar" ];} {
|
||||||
|
inherit whoGetsTheFlagFirst lib stdenv;
|
||||||
|
};
|
||||||
|
|
||||||
|
# blocking example, this shouldn't even start building:
|
||||||
|
blockingBiteMonster = simpleFlagYesNoF "biting" {} {
|
||||||
|
inherit whoGetsTheFlagFirst lib stdenv;
|
||||||
|
flags = [ "flag" "bitingMonster" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# assertion example this shouldn't even start building:
|
||||||
|
assertion = simpleFlagYesNoF "assertion" {} {
|
||||||
|
inherit whoGetsTheFlagFirst lib stdenv;
|
||||||
|
flags = [ "assertionFlag" ];
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
|
@ -1,9 +1,24 @@
|
||||||
|
/*
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
You define you custom builder script by adding all build steps to a list.
|
||||||
|
for example:
|
||||||
|
builder = writeScript "fsg-4.4-builder"
|
||||||
|
(textClosure [doUnpack addInputs preBuild doMake installPhase doForceShare]);
|
||||||
|
|
||||||
|
a step is defined by noDepEntry, FullDepEntry or PackEntry.
|
||||||
|
To ensure that prerequisite are met those are added before the task itself by
|
||||||
|
textClosureDupList. Duplicated items are removed again.
|
||||||
|
|
||||||
|
See trace/nixpkgs/trunk/pkgs/top-level/builder-defs.nix for some predefined build steps
|
||||||
|
|
||||||
|
*/
|
||||||
args:
|
args:
|
||||||
with args;
|
with args;
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
inherit (builtins)
|
inherit (builtins)
|
||||||
head tail isList;
|
head tail isList isAttrs;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
@ -37,12 +52,23 @@ rec {
|
||||||
(concatLists (map textClosureDupList arg.deps)) ++ [arg]
|
(concatLists (map textClosureDupList arg.deps)) ++ [arg]
|
||||||
);
|
);
|
||||||
|
|
||||||
textClosureList = arg:
|
textClosureDupListOverridable = predefined: arg:
|
||||||
|
(
|
||||||
|
if isList arg then
|
||||||
|
textClosureDupListOverridable predefined {text = ""; deps = arg;}
|
||||||
|
else if isAttrs arg then
|
||||||
|
(concatLists (map (textClosureDupListOverridable predefined) arg.deps)) ++ [arg]
|
||||||
|
else
|
||||||
|
textClosureDupListOverridable predefined (getAttr [arg] [] predefined)
|
||||||
|
);
|
||||||
|
|
||||||
|
textClosureListOverridable = predefined: arg:
|
||||||
(map (x : x.text)
|
(map (x : x.text)
|
||||||
(uniqList {inputList = textClosureDupList arg;}));
|
(uniqList {inputList = textClosureDupListOverridable predefined arg;}));
|
||||||
textClosure = arg: concatStringsSep "\n" (textClosureList arg);
|
textClosureOverridable = predefined: arg: concatStringsSep "\n" (textClosureListOverridable predefined arg);
|
||||||
|
|
||||||
textClosureMap = f: arg: concatStringsSep "\n" (map f (textClosureList arg));
|
textClosureMapOveridable = f: predefined: arg:
|
||||||
|
concatStringsSep "\n" (map f (textClosureListOverridable predefined arg));
|
||||||
|
|
||||||
noDepEntry = text : {inherit text;deps = [];};
|
noDepEntry = text : {inherit text;deps = [];};
|
||||||
FullDepEntry = text : deps: {inherit text deps;};
|
FullDepEntry = text : deps: {inherit text deps;};
|
||||||
|
|
|
@ -59,6 +59,7 @@ while (scalar @workset > 0) {
|
||||||
if (/\\input\{(.*)\}/) {
|
if (/\\input\{(.*)\}/) {
|
||||||
my $fn2 = $1;
|
my $fn2 = $1;
|
||||||
die "absolute path! $fn2" if substr($fn2, 0, 1) eq "/";
|
die "absolute path! $fn2" if substr($fn2, 0, 1) eq "/";
|
||||||
|
push @workset, "$path/$fn2.tex";
|
||||||
push @workset, "$path/$fn2";
|
push @workset, "$path/$fn2";
|
||||||
} elsif (/\\usepackage(\[.*\])?\{(.*)\}/) {
|
} elsif (/\\usepackage(\[.*\])?\{(.*)\}/) {
|
||||||
my $fn2 = $2;
|
my $fn2 = $2;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
source $stdenv/setup
|
source $stdenv/setup
|
||||||
source $makeWrapper
|
|
||||||
|
|
||||||
unpackPhase
|
unpackPhase
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
@ -7,7 +6,6 @@ cd $name
|
||||||
$python/bin/python setup.py install --prefix=$out
|
$python/bin/python setup.py install --prefix=$out
|
||||||
|
|
||||||
for i in $(cd $out/bin && ls); do
|
for i in $(cd $out/bin && ls); do
|
||||||
mv $out/bin/$i $out/bin/.orig-$i
|
wrapProgram $out/bin/$i \
|
||||||
makeWrapper $out/bin/.orig-$i $out/bin/$i \
|
--prefix PYTHONPATH : "$(toPythonPath $python):$(toPythonPath $out):$(toPythonPath $pysqlite):$subversion/lib/svn-python:$clearsilver/site-packages"
|
||||||
--set PYTHONPATH "$python/site-packages:$out/lib/python2.4/site-packages:$pysqlite/lib/python2.4/site-packages:$subversion/lib/svn-python:$clearsilver/site-packages"
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -3,13 +3,12 @@
|
||||||
assert stdenv.system == "i686-linux";
|
assert stdenv.system == "i686-linux";
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "trac-0.9.5";
|
name = "trac-0.9.5";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://ftp.edgewall.com/pub/trac/trac-0.9.5.tar.gz";
|
url = "http://ftp.edgewall.com/pub/trac/trac-0.9.5.tar.gz";
|
||||||
md5 = "3b7d708eaf905cc6ba2b6b10a09a8cf4";
|
md5 = "3b7d708eaf905cc6ba2b6b10a09a8cf4";
|
||||||
};
|
};
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
inherit stdenv python subversion clearsilver sqlite pysqlite makeWrapper;
|
buildInputs = [makeWrapper];
|
||||||
|
inherit stdenv python subversion clearsilver sqlite pysqlite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://downloads.sourceforge.net/madwifi/madwifi-0.9.3.3.tar.bz2;
|
url = http://downloads.sourceforge.net/madwifi/madwifi-0.9.3.3.tar.bz2;
|
||||||
|
@ -16,6 +16,7 @@ args : with args;
|
||||||
sha256 = "11xpx5g9w7ilagvj60prc3s8a3x0n5n4mr0b7nh0lxwrbjdgjjfg";
|
sha256 = "11xpx5g9w7ilagvj60prc3s8a3x0n5n4mr0b7nh0lxwrbjdgjjfg";
|
||||||
} else "")*/;
|
} else "")*/;
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
doPatch = FullDepEntry (if patchAR2425x86 !="" then ''
|
doPatch = FullDepEntry (if patchAR2425x86 !="" then ''
|
||||||
cd hal
|
cd hal
|
||||||
|
@ -25,7 +26,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "atheros-"+version;
|
name = "atheros-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doPatch doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doPatch doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Atheros WiFi driver.
|
Atheros WiFi driver.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2756-20071018.tar.gz;
|
url = http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2756-20071018.tar.gz;
|
||||||
|
@ -16,6 +16,7 @@ args : with args;
|
||||||
sha256 = "11xpx5g9w7ilagvj60prc3s8a3x0n5n4mr0b7nh0lxwrbjdgjjfg";
|
sha256 = "11xpx5g9w7ilagvj60prc3s8a3x0n5n4mr0b7nh0lxwrbjdgjjfg";
|
||||||
} else "");
|
} else "");
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
doPatch = FullDepEntry (if patchAR2425x86 !="" then ''
|
doPatch = FullDepEntry (if patchAR2425x86 !="" then ''
|
||||||
cd hal
|
cd hal
|
||||||
|
@ -26,7 +27,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "atheros-"+version;
|
name = "atheros-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doPatch doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doPatch doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Atheros WiFi driver.
|
Atheros WiFi driver.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r3122-20080109.tar.gz;
|
url = http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r3122-20080109.tar.gz;
|
||||||
|
@ -10,10 +10,11 @@ args : with args;
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
makeFlags = [''KERNELPATH=${kernel}/lib/modules/*/build'' ''DESTDIR=$out''];
|
makeFlags = [''KERNELPATH=${kernel}/lib/modules/*/build'' ''DESTDIR=$out''];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "atheros-"+version;
|
name = "atheros-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Atheros WiFi driver.
|
Atheros WiFi driver.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://download.savannah.gnu.org/releases/dmidecode/dmidecode-2.9.tar.bz2;
|
url = http://download.savannah.gnu.org/releases/dmidecode/dmidecode-2.9.tar.bz2;
|
||||||
|
@ -10,10 +10,11 @@ args : with args;
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
makeFlags = "prefix=\$out";
|
makeFlags = "prefix=\$out";
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "dmidecode-"+version;
|
name = "dmidecode-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [ doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [ doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Tool to decode Desktop Management Interface and SBIOS data.
|
Tool to decode Desktop Management Interface and SBIOS data.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.0.tar.gz;
|
url = http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.0.tar.gz;
|
||||||
|
@ -10,6 +10,7 @@ args : with args;
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
makeFlags = [" prefix=\$out "];
|
makeFlags = [" prefix=\$out "];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
preBuild = FullDepEntry ("
|
preBuild = FullDepEntry ("
|
||||||
sed -e 's@/usr/local@'\$out'@g' -i Makefile.m4 Makefile
|
sed -e 's@/usr/local@'\$out'@g' -i Makefile.m4 Makefile
|
||||||
|
@ -18,7 +19,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "dvd+rw-tools-"+version;
|
name = "dvd+rw-tools-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [preBuild doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [preBuild doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
DVD+RW tools.
|
DVD+RW tools.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://fabrice.bellard.free.fr/qemu/kqemu-1.3.0pre11.tar.gz;
|
url = http://fabrice.bellard.free.fr/qemu/kqemu-1.3.0pre11.tar.gz;
|
||||||
|
@ -8,11 +8,13 @@ args : with args;
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
configureFlags = [''--prefix=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)''];
|
configureFlags = [''--prefix=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)''];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
debugStep = FullDepEntry (''
|
debugStep = FullDepEntry (''
|
||||||
cat config-host.mak
|
cat config-host.mak
|
||||||
'') [minInit];
|
'') [minInit];
|
||||||
preConfigure = FullDepEntry (''
|
preConfigure = FullDepEntry (''
|
||||||
|
sed -e 's/`uname -r`/'"$(basename ${kernel}/lib/modules/*)"'/' -i install.sh
|
||||||
sed -e '/kernel_path=/akernel_path=$out$kernel_path' -i install.sh
|
sed -e '/kernel_path=/akernel_path=$out$kernel_path' -i install.sh
|
||||||
sed -e '/depmod/d' -i install.sh
|
sed -e '/depmod/d' -i install.sh
|
||||||
cat install.sh
|
cat install.sh
|
||||||
|
@ -21,7 +23,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "kqemu-"+version;
|
name = "kqemu-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [preConfigure doConfigure debugStep doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [preConfigure doConfigure debugStep doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Kernel module for Qemu acceleration
|
Kernel module for Qemu acceleration
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
addSbinPath = true;
|
addSbinPath = true;
|
||||||
src = "";
|
src = "";
|
||||||
buildInputs = [module_init_tools];
|
buildInputs = [module_init_tools];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let
|
let
|
||||||
|
|
||||||
doCollect = FullDepEntry (''
|
doCollect = FullDepEntry (''
|
||||||
|
@ -17,7 +18,7 @@ done
|
||||||
rm -rf nix-support
|
rm -rf nix-support
|
||||||
cd lib/modules/
|
cd lib/modules/
|
||||||
rm */modules.*
|
rm */modules.*
|
||||||
MODULE_DIR=$PWD/ depmod -a
|
MODULE_DIR=$PWD/ depmod -a *
|
||||||
cd $out/
|
cd $out/
|
||||||
'') [minInit addInputs defEnsureDir];
|
'') [minInit addInputs defEnsureDir];
|
||||||
in
|
in
|
||||||
|
@ -25,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||||
name = "kernel-modules";
|
name = "kernel-modules";
|
||||||
inherit moduleSources;
|
inherit moduleSources;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doCollect doForceShare doPropagate]);
|
(textClosure localDefs [doCollect doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
A directory to hold all the modules, including those
|
A directory to hold all the modules, including those
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = http://sg.torque.net/sg/p/sdparm-1.02.tgz;
|
url = http://sg.torque.net/sg/p/sdparm-1.02.tgz;
|
||||||
|
@ -9,10 +9,11 @@ args : with args;
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "sdparm-"+version;
|
name = "sdparm-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
SCSI parameters utility.
|
SCSI parameters utility.
|
||||||
|
|
|
@ -3,17 +3,17 @@
|
||||||
let
|
let
|
||||||
|
|
||||||
usbids = fetchurl {
|
usbids = fetchurl {
|
||||||
url = http://nix.cs.uu.nl/dist/tarballs/usb.ids.20061212.bz2;
|
url = http://nix.cs.uu.nl/dist/tarballs/usb.ids.20080115.bz2;
|
||||||
sha256 = "112l4fzjn5p3y6fv3x10vbrd36n2v5n04s7pjdlkb2yqv4crp84m";
|
sha256 = "0xymp8fpp9pnkj2i4ry8zpsvy18zw14sx03pnz316lpgwc6dx12n";
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "usbutils-0.72";
|
name = "usbutils-0.73";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://sourceforge/linux-usb/usbutils-0.72.tar.gz;
|
url = mirror://sourceforge/linux-usb/usbutils-0.73.tar.gz;
|
||||||
sha256 = "08s4g4sz7p3a1afvphxd7h5bbfywvp0j611y85wbhwr14i9m6f00";
|
sha256 = "1x27mc2apyipf8fa2ac49rfnkm7f5dwv784b1ncgc5yjiz4prp1f";
|
||||||
};
|
};
|
||||||
buildInputs = [libusb];
|
buildInputs = [libusb];
|
||||||
preBuild = "bunzip2 < ${usbids} > usb.ids";
|
preBuild = "bunzip2 < ${usbids} > usb.ids";
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
tar xfvz $src
|
||||||
|
cd tomcat-connectors-*-src/native
|
||||||
|
./configure --with-apxs=$apacheHttpd/bin/apxs --with-java-home=$jdk
|
||||||
|
make
|
||||||
|
ensureDir $out/modules
|
||||||
|
cp apache-2.0/mod_jk.so $out/modules
|
|
@ -0,0 +1,14 @@
|
||||||
|
{stdenv, fetchurl, apacheHttpd, jdk}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "tomcat-connectors-1.2.26";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = http://apache.proserve.nl/tomcat/tomcat-connectors/jk/source/jk-1.2.26/tomcat-connectors-1.2.26-src.tar.gz;
|
||||||
|
md5 = "feaec245136bc4d99a9dde95a00ea93c";
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit apacheHttpd;
|
||||||
|
buildInputs = [apacheHttpd jdk];
|
||||||
|
}
|
18
pkgs/servers/http/jboss/builder.sh
Normal file
18
pkgs/servers/http/jboss/builder.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
buildInputs="$jdk5"
|
||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
export JDK_HOME=$jdk5
|
||||||
|
export JAVA_HOME=$jdk5
|
||||||
|
|
||||||
|
tar xfvz $src
|
||||||
|
cd jboss-*
|
||||||
|
cd build
|
||||||
|
sh build.sh
|
||||||
|
ensureDir $out
|
||||||
|
cp -av output/jboss-*/* $out
|
||||||
|
|
||||||
|
# Insert JAVA_HOME variable to make sure the latest JRE is used and not version 5
|
||||||
|
sed -i -e "/GREP/aJAVA_HOME=$jdk" $out/bin/run.sh
|
||||||
|
|
||||||
|
# Change the deploy directory to the nix profile
|
||||||
|
sed -i -e "s|deploy/|/nix/var/nix/profiles/default/server/default/deploy/|" $out/server/default/conf/jboss-service.xml
|
20
pkgs/servers/http/jboss/default.nix
Normal file
20
pkgs/servers/http/jboss/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ stdenv, fetchurl, jdk5, jdk }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "jboss-4.2.2.GA";
|
||||||
|
|
||||||
|
builder = ./builder.sh;
|
||||||
|
src =
|
||||||
|
fetchurl {
|
||||||
|
url = http://garr.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.2.GA-src.tar.gz;
|
||||||
|
md5 = "2a626cdccabe712628555676d67ad44a";
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit jdk5 jdk;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "http://www.jboss.org/";
|
||||||
|
description = "JBoss, Open Source J2EE application server";
|
||||||
|
license = "GPL/LGPL";
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,12 +5,12 @@ assert ncurses != null;
|
||||||
assert readline != null;
|
assert readline != null;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "postgresql-8.0.6";
|
name = "postgresql-8.2.6";
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = ftp://ftp2.nl.postgresql.org/mirror/postgresql/source/v8.0.6/postgresql-8.0.6.tar.bz2;
|
url = ftp://ftp.de.postgresql.org/mirror/postgresql/source/v8.2.6/postgresql-8.2.6.tar.bz2;
|
||||||
md5 = "f3b27b8171267f9a87592f931c09f0ee";
|
sha256="056ixbsfmdwhniryc0mr1kl66jywkqqhqvjdi7i3v4qzh9z34hgf";
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit readline;
|
inherit readline;
|
||||||
|
|
9
pkgs/servers/xmpp/ejabberd/builder.sh
Normal file
9
pkgs/servers/xmpp/ejabberd/builder.sh
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
buildInputs="$expat $erlang $zlib $openssl"
|
||||||
|
|
||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
tar xfvz $src
|
||||||
|
cd $name/src
|
||||||
|
./configure --prefix=$out
|
||||||
|
make
|
||||||
|
make install
|
11
pkgs/servers/xmpp/ejabberd/default.nix
Normal file
11
pkgs/servers/xmpp/ejabberd/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{stdenv, fetchurl, expat, erlang, zlib, openssl}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "ejabberd-1.1.4";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
src = fetchurl {
|
||||||
|
url = http://www.process-one.net/downloads/ejabberd/1.1.4/ejabberd-1.1.4.tar.gz;
|
||||||
|
md5 = "65e9cd346f11a28afbacfe1d7be3a33b";
|
||||||
|
};
|
||||||
|
inherit expat erlang zlib openssl;
|
||||||
|
}
|
|
@ -1,902 +0,0 @@
|
||||||
with (import ../../lib/strings-with-deps.nix (import ../../lib/default-unstable.nix));
|
|
||||||
|
|
||||||
rec {
|
|
||||||
setStrictMode = noDepEntry "set -e;";
|
|
||||||
setNixGcc = noDepEntry "test -z \$NIX_GCC && NIX_GCC=@gcc@;";
|
|
||||||
|
|
||||||
setPathDelimiter = noDepEntry "
|
|
||||||
if [ -z ${system##*cygwin*} ]; then
|
|
||||||
PATH_DELIMITER=;
|
|
||||||
else
|
|
||||||
PATH_DELIMITER=;
|
|
||||||
fi
|
|
||||||
" ;
|
|
||||||
|
|
||||||
|
|
||||||
initPath = noDepEntry "# Set up the initial path.
|
|
||||||
PATH=
|
|
||||||
for i in \$NIX_GCC @initialPath@; do
|
|
||||||
PATH=\$PATH\${PATH:+:}\$i/bin
|
|
||||||
done
|
|
||||||
|
|
||||||
if test \"\$NIX_DEBUG\" = \"1\"; then
|
|
||||||
echo \"Initial path: \$PATH\"
|
|
||||||
fi
|
|
||||||
";
|
|
||||||
|
|
||||||
execPreHook = FullDepEntry "# Execute the pre-hook.
|
|
||||||
export SHELL=@shell@
|
|
||||||
if test -z \"\$shell\"; then
|
|
||||||
export shell=@shell@
|
|
||||||
fi
|
|
||||||
param1=@param1@
|
|
||||||
param2=@param2@
|
|
||||||
param3=@param3@
|
|
||||||
param4=@param4@
|
|
||||||
param5=@param5@
|
|
||||||
if test -n \"@preHook@\"; then
|
|
||||||
source @preHook@
|
|
||||||
fi
|
|
||||||
" [];
|
|
||||||
|
|
||||||
checkShellEnv = FullDepEntry "# Check that the pre-hook initialised SHELL.
|
|
||||||
if test -z \"\$SHELL\"; then echo \"SHELL not set\"; exit 1; fi
|
|
||||||
" [];
|
|
||||||
|
|
||||||
gccSetupHook = FullDepEntry "# Hack: run gcc's setup hook.
|
|
||||||
envHooks=()
|
|
||||||
if test -f \$NIX_GCC/nix-support/setup-hook; then
|
|
||||||
source \$NIX_GCC/nix-support/setup-hook
|
|
||||||
fi
|
|
||||||
" [setNixGcc];
|
|
||||||
|
|
||||||
|
|
||||||
defEnsureDir = FullDepEntry "# Ensure that the given directories exists.
|
|
||||||
ensureDir() {
|
|
||||||
local dir
|
|
||||||
for dir in \"\$@\"; do
|
|
||||||
if ! test -x \"\$dir\"; then mkdir -p \"\$dir\"; fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
" [];
|
|
||||||
|
|
||||||
defInstallBin = FullDepEntry "
|
|
||||||
|
|
||||||
installBin() {
|
|
||||||
ensureDir $out/bin
|
|
||||||
cp "$@" $out/bin
|
|
||||||
}
|
|
||||||
|
|
||||||
" [];
|
|
||||||
|
|
||||||
defAssertEnvExists = FullDepEntry "
|
|
||||||
assertEnvExists(){
|
|
||||||
if test -z "${!1}"; then
|
|
||||||
msg=${2:-error: assertion failed: env var $1 is required}
|
|
||||||
echo $msg >&2; exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
" [];
|
|
||||||
|
|
||||||
defFail = FullDepEntry "# Called when some build action fails. If \$succeedOnFailure is set,
|
|
||||||
# create the file `\$out/nix-support/failed' to signal failure, and
|
|
||||||
# exit normally. Otherwise, exit with failure.
|
|
||||||
fail() {
|
|
||||||
exitCode=\$?
|
|
||||||
if test \"\$succeedOnFailure\" = 1; then
|
|
||||||
ensureDir \"\$out/nix-support\"
|
|
||||||
touch \"\$out/nix-support/failed\"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit \$?
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
" [];
|
|
||||||
|
|
||||||
runAddInputsHook = FullDepEntry "# Allow the caller to augment buildInputs (it's not always possible to
|
|
||||||
# do this before the call to setup.sh, since the PATH is empty at that
|
|
||||||
# point; here we have a basic Unix environment).
|
|
||||||
eval \"\$addInputsHook\"
|
|
||||||
" [defFail];
|
|
||||||
|
|
||||||
defFindInputs = FullDepEntry "# Recursively find all build inputs.
|
|
||||||
findInputs()
|
|
||||||
{
|
|
||||||
local pkg=\$1
|
|
||||||
|
|
||||||
case \$pkgs in
|
|
||||||
*\ \$pkg\ *)
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
pkgs=\"\$pkgs \$pkg \"
|
|
||||||
|
|
||||||
if test -f \$pkg/nix-support/setup-hook; then
|
|
||||||
source \$pkg/nix-support/setup-hook
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -f \$pkg/nix-support/propagated-build-inputs; then
|
|
||||||
for i in \$(cat \$pkg/nix-support/propagated-build-inputs); do
|
|
||||||
findInputs \$i
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
" [];
|
|
||||||
|
|
||||||
getInputs = FullDepEntry "pkgs=\"\"
|
|
||||||
if test -n \"\$buildinputs\"; then
|
|
||||||
buildInputs=\"\$buildinputs\" # compatibility
|
|
||||||
fi
|
|
||||||
for i in \$buildInputs \$propagatedBuildInputs; do
|
|
||||||
findInputs \$i
|
|
||||||
done
|
|
||||||
" [defFindInputs];
|
|
||||||
|
|
||||||
defAddToEnv = FullDepEntry "# Set the relevant environment variables to point to the build inputs
|
|
||||||
# found above.
|
|
||||||
addToEnv()
|
|
||||||
{
|
|
||||||
local pkg=\$1
|
|
||||||
|
|
||||||
if test \"\$ignoreFailedInputs\" != \"1\" -a -e \$1/nix-support/failed; then
|
|
||||||
echo \"failed input \$1\" >&2
|
|
||||||
fail
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -d \$1/bin; then
|
|
||||||
export _PATH=\$_PATH\${_PATH:+:}\$1/bin
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i in \"\${envHooks[@]}\"; do
|
|
||||||
\$i \$pkg
|
|
||||||
done
|
|
||||||
}
|
|
||||||
" [defFail];
|
|
||||||
|
|
||||||
preparePackageEnv = FullDepEntry "for i in \$pkgs; do
|
|
||||||
addToEnv \$i
|
|
||||||
done
|
|
||||||
" [getInputs defAddToEnv];
|
|
||||||
|
|
||||||
putOutInRpath = FullDepEntry "# Add the output as an rpath.
|
|
||||||
if test \"\$NIX_NO_SELF_RPATH\" != \"1\"; then
|
|
||||||
export NIX_LDFLAGS=\"-rpath \$out/lib \$NIX_LDFLAGS\"
|
|
||||||
fi
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
setupStripping = FullDepEntry "# Strip debug information by default.
|
|
||||||
if test -z \"\$NIX_STRIP_DEBUG\"; then
|
|
||||||
export NIX_STRIP_DEBUG=1
|
|
||||||
export NIX_CFLAGS_STRIP=\"-g0 -Wl,--strip-debug\"
|
|
||||||
fi
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
checkNixEnv = FullDepEntry "# Do we know where the store is? This is required for purity checking.
|
|
||||||
if test -z \"\$NIX_STORE\"; then
|
|
||||||
echo \"Error: you have an old version of Nix that does not set the\" \
|
|
||||||
\"NIX_STORE variable. Please upgrade.\" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# We also need to know the root of the build directory for purity checking.
|
|
||||||
if test -z \"\$NIX_BUILD_TOP\"; then
|
|
||||||
echo \"Error: you have an old version of Nix that does not set the\" \
|
|
||||||
\"NIX_BUILD_TOP variable. Please upgrade.\" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
setTZ = noDepEntry "# Set the TZ (timezone) environment variable, otherwise commands like
|
|
||||||
# `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must
|
|
||||||
# be set--see zic manual page 2004').
|
|
||||||
export TZ=UTC
|
|
||||||
" ;
|
|
||||||
|
|
||||||
setPrefix = FullDepEntry "# Set the prefix. This is generally \$out, but it can be overriden,
|
|
||||||
# for instance if we just want to perform a test build/install to a
|
|
||||||
# temporary location and write a build report to \$out.
|
|
||||||
if test -z \"\$prefix\"; then
|
|
||||||
prefix=\"\$out\";
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test \"\$useTempPrefix\" = \"1\"; then
|
|
||||||
prefix=\"\$NIX_BUILD_TOP/tmp_prefix\";
|
|
||||||
fi
|
|
||||||
" [checkNixEnv];
|
|
||||||
|
|
||||||
runPostHook = FullDepEntry "# Execute the post-hook.
|
|
||||||
if test -n \"@postHook@\"; then
|
|
||||||
source @postHook@
|
|
||||||
fi
|
|
||||||
" [setTZ setPrefix execPreHook gccSetupHook preparePackageEnv];
|
|
||||||
|
|
||||||
finalSetPath = FullDepEntry "PATH=\$_PATH\${_PATH:+:}\$PATH
|
|
||||||
if test \"\$NIX_DEBUG\" = \"1\"; then
|
|
||||||
echo \"Final path: \$PATH\"
|
|
||||||
fi
|
|
||||||
" [runPostHook];
|
|
||||||
|
|
||||||
defSubstitute = FullDepEntry "######################################################################
|
|
||||||
# Textual substitution functions.
|
|
||||||
|
|
||||||
|
|
||||||
# Some disgusting hackery to escape replacements in Sed substitutions.
|
|
||||||
# We should really have a tool that replaces literal values by other
|
|
||||||
# literal values, without any need for escaping.
|
|
||||||
escapeSed() {
|
|
||||||
local s=\"\$1\"
|
|
||||||
# The `tr' hack is to escape newlines. Sed handles newlines very
|
|
||||||
# badly, so we just replace newlines with the magic character 0xff
|
|
||||||
# (377 octal). So don't use that character in replacements :-P
|
|
||||||
echo -n \"\$1\" | tr '\012' '\377' | sed -e 's^\\^\\\\^g' -e 's^\xff^\\n^g' -e 's/\^/\\^/g' -e 's/&/\\&/g'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
substitute() {
|
|
||||||
local input=\"\$1\"
|
|
||||||
local output=\"\$2\"
|
|
||||||
|
|
||||||
local -a params=(\"\$@\")
|
|
||||||
|
|
||||||
local sedScript=\$NIX_BUILD_TOP/.sedargs
|
|
||||||
rm -f \$sedScript
|
|
||||||
touch \$sedScript
|
|
||||||
|
|
||||||
local n p pattern replacement varName
|
|
||||||
|
|
||||||
for ((n = 2; n < \${#params[*]}; n += 1)); do
|
|
||||||
p=\${params[\$n]}
|
|
||||||
|
|
||||||
if test \"\$p\" = \"--replace\"; then
|
|
||||||
pattern=\"\${params[\$((n + 1))]}\"
|
|
||||||
replacement=\"\${params[\$((n + 2))]}\"
|
|
||||||
n=\$((n + 2))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test \"\$p\" = \"--subst-var\"; then
|
|
||||||
varName=\"\${params[\$((n + 1))]}\"
|
|
||||||
pattern=\"@\$varName@\"
|
|
||||||
replacement=\"\${!varName}\"
|
|
||||||
n=\$((n + 1))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test \"\$p\" = \"--subst-var-by\"; then
|
|
||||||
pattern=\"@\${params[\$((n + 1))]}@\"
|
|
||||||
replacement=\"\${params[\$((n + 2))]}\"
|
|
||||||
n=\$((n + 2))
|
|
||||||
fi
|
|
||||||
|
|
||||||
replacement=\"\$(escapeSed \"\$replacement\")\"
|
|
||||||
|
|
||||||
echo \"s^\$pattern^\$replacement^g\" >> \$sedScript
|
|
||||||
done
|
|
||||||
|
|
||||||
sed -f \$sedScript < \"\$input\" > \"\$output\".tmp
|
|
||||||
if test -x \"\$output\"; then
|
|
||||||
chmod +x \"\$output\".tmp
|
|
||||||
fi
|
|
||||||
mv -f \"\$output\".tmp \"\$output\"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
substituteInPlace() {
|
|
||||||
local fileName=\"\$1\"
|
|
||||||
shift
|
|
||||||
substitute \"\$fileName\" \"\$fileName\" \"\$@\"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
substituteAll() {
|
|
||||||
local input=\"\$1\"
|
|
||||||
local output=\"\$2\"
|
|
||||||
|
|
||||||
# Select all environment variables that start with a lowercase character.
|
|
||||||
for envVar in \$(env | sed \"s/^[^a-z].*//\" | sed \"s/^\([^=]*\)=.*/\1/\"); do
|
|
||||||
if test \"\$NIX_DEBUG\" = \"1\"; then
|
|
||||||
echo \"\$envVar -> \${!envVar}\"
|
|
||||||
fi
|
|
||||||
args=\"\$args --subst-var \$envVar\"
|
|
||||||
done
|
|
||||||
|
|
||||||
substitute \"\$input\" \"\$output\" \$args
|
|
||||||
}
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
defNest = NoDepEntry "######################################################################
|
|
||||||
# What follows is the generic builder.
|
|
||||||
|
|
||||||
|
|
||||||
nestingLevel=0
|
|
||||||
|
|
||||||
startNest() {
|
|
||||||
nestingLevel=\$((\$nestingLevel + 1))
|
|
||||||
echo -en \"\e[\$1p\"
|
|
||||||
}
|
|
||||||
|
|
||||||
stopNest() {
|
|
||||||
nestingLevel=\$((\$nestingLevel - 1))
|
|
||||||
echo -en \"\e[q\"
|
|
||||||
}
|
|
||||||
|
|
||||||
header() {
|
|
||||||
startNest \"\$2\"
|
|
||||||
echo \"\$1\"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make sure that even when we exit abnormally, the original nesting
|
|
||||||
# level is properly restored.
|
|
||||||
closeNest() {
|
|
||||||
while test \$nestingLevel -gt 0; do
|
|
||||||
stopNest
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
trap \"closeNest\" EXIT
|
|
||||||
" ;
|
|
||||||
|
|
||||||
|
|
||||||
defDumpVars = FullDepEntry "# This function is useful for debugging broken Nix builds. It dumps
|
|
||||||
# all environment variables to a file `env-vars' in the build
|
|
||||||
# directory. If the build fails and the `-K' option is used, you can
|
|
||||||
# then go to the build directory and source in `env-vars' to reproduce
|
|
||||||
# the environment used for building.
|
|
||||||
dumpVars() {
|
|
||||||
if test \"\$noDumpEnvVars\" != \"1\"; then
|
|
||||||
export > \$NIX_BUILD_TOP/env-vars
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
" [checkNixEnv];
|
|
||||||
|
|
||||||
|
|
||||||
defStartStopLog = FullDepEntry "# Redirect stdout/stderr to a named pipe connected to a `tee' process
|
|
||||||
# that writes the specified file (and also to our original stdout).
|
|
||||||
# The original stdout is saved in descriptor 3.
|
|
||||||
startLog() {
|
|
||||||
local logFile=\${logNr}_\$1
|
|
||||||
logNr=\$((logNr + 1))
|
|
||||||
if test \"\$logPhases\" = 1; then
|
|
||||||
ensureDir \$logDir
|
|
||||||
|
|
||||||
exec 3>&1
|
|
||||||
|
|
||||||
if test \"\$dontLogThroughTee\" != 1; then
|
|
||||||
# This required named pipes (fifos).
|
|
||||||
logFifo=\$NIX_BUILD_TOP/log_fifo
|
|
||||||
test -p \$logFifo || mkfifo \$logFifo
|
|
||||||
startLogWrite \"\$logDir/\$logFile\" \"\$logFifo\"
|
|
||||||
exec > \$logFifo 2>&1
|
|
||||||
else
|
|
||||||
exec > \$logDir/\$logFile 2>&1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Factored into a separate function so that it can be overriden.
|
|
||||||
startLogWrite() {
|
|
||||||
tee \"\$1\" < \"\$2\" &
|
|
||||||
logWriterPid=\$!
|
|
||||||
}
|
|
||||||
|
|
||||||
# Restore the original stdout/stderr.
|
|
||||||
stopLog() {
|
|
||||||
if test \"\$logPhases\" = 1; then
|
|
||||||
exec >&3 2>&1
|
|
||||||
|
|
||||||
# Wait until the tee process has died. Otherwise output from
|
|
||||||
# different phases may be mixed up.
|
|
||||||
if test -n \"\$logWriterPid\"; then
|
|
||||||
wait \$logWriterPid
|
|
||||||
logWriterPid=
|
|
||||||
rm \$logFifo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
" [setLogVars checkNixEnv ];
|
|
||||||
|
|
||||||
|
|
||||||
setLogVars = FullDepEntry "if test -z \"\$logDir\"; then
|
|
||||||
logDir=\$out/log
|
|
||||||
fi
|
|
||||||
|
|
||||||
logNr=0
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
defStripHash = FullDepEntry "# Utility function: return the base name of the given path, with the
|
|
||||||
# prefix `HASH-' removed, if present.
|
|
||||||
stripHash() {
|
|
||||||
strippedName=\$(basename \$1);
|
|
||||||
if echo \"\$strippedName\" | grep -q '^[a-z0-9]\{32\}-'; then
|
|
||||||
strippedName=\$(echo \"\$strippedName\" | cut -c34-)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
defUnpack = FullDepEntry "
|
|
||||||
unpackFile() {
|
|
||||||
local file=\$1
|
|
||||||
local cmd
|
|
||||||
|
|
||||||
header \"unpacking source archive \$file\" 3
|
|
||||||
|
|
||||||
case \$file in
|
|
||||||
*.tar)
|
|
||||||
tar xvf \$file || fail
|
|
||||||
;;
|
|
||||||
*.tar.gz | *.tgz | *.tar.Z)
|
|
||||||
gunzip < \$file | tar xvf - || fail
|
|
||||||
;;
|
|
||||||
*.tar.bz2 | *.tbz2)
|
|
||||||
bunzip2 < \$file | tar xvf - || fail
|
|
||||||
;;
|
|
||||||
*.zip)
|
|
||||||
unzip \$file || fail
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if test -d \"\$file\"; then
|
|
||||||
stripHash \$file
|
|
||||||
cp -prvd \$file \$strippedName || fail
|
|
||||||
else
|
|
||||||
if test -n \"\$findUnpacker\"; then
|
|
||||||
\$findUnpacker \$1;
|
|
||||||
fi
|
|
||||||
if test -z \"\$unpackCmd\"; then
|
|
||||||
echo \"source archive \$file has unknown type\"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
eval \"\$unpackCmd\" || fail
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [preparePackageEnv];
|
|
||||||
|
|
||||||
defUnpackW = FullDepEntry "
|
|
||||||
unpackW() {
|
|
||||||
if test -n \"\$unpackPhase\"; then
|
|
||||||
eval \"\$unpackPhase\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z \"\$srcs\"; then
|
|
||||||
if test -z \"\$src\"; then
|
|
||||||
echo 'variable \$src or \$srcs should point to the source'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
srcs=\"\$src\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# To determine the source directory created by unpacking the
|
|
||||||
# source archives, we record the contents of the current
|
|
||||||
# directory, then look below which directory got added. Yeah,
|
|
||||||
# it's rather hacky.
|
|
||||||
local dirsBefore=\"\"
|
|
||||||
for i in *; do
|
|
||||||
if test -d \"\$i\"; then
|
|
||||||
dirsBefore=\"\$dirsBefore \$i \"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Unpack all source archives.
|
|
||||||
for i in \$srcs; do
|
|
||||||
unpackFile \$i
|
|
||||||
done
|
|
||||||
|
|
||||||
# Find the source directory.
|
|
||||||
if test -n \"\$setSourceRoot\"; then
|
|
||||||
eval \"\$setSourceRoot\"
|
|
||||||
else
|
|
||||||
sourceRoot=
|
|
||||||
for i in *; do
|
|
||||||
if test -d \"\$i\"; then
|
|
||||||
case \$dirsBefore in
|
|
||||||
*\ \$i\ *)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if test -n \"\$sourceRoot\"; then
|
|
||||||
echo \"unpacker produced multiple directories\"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
sourceRoot=\$i
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z \"\$sourceRoot\"; then
|
|
||||||
echo \"unpacker appears to have produced no directories\"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo \"source root is \$sourceRoot\"
|
|
||||||
|
|
||||||
# By default, add write permission to the sources. This is often
|
|
||||||
# necessary when sources have been copied from other store
|
|
||||||
# locations.
|
|
||||||
if test \"dontMakeSourcesWritable\" != 1; then
|
|
||||||
chmod -R +w \$sourceRoot
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval \"\$postUnpack\"
|
|
||||||
}
|
|
||||||
" [defUnpack];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defUnpackPhase = FullDepEntry "
|
|
||||||
unpackPhase() {
|
|
||||||
sourceRoot=. # don't change to user dir homeless shelter if custom unpackSource does'nt set sourceRoot
|
|
||||||
header \"unpacking sources\"
|
|
||||||
startLog \"unpack\"
|
|
||||||
unpackW
|
|
||||||
stopLog
|
|
||||||
stopNest
|
|
||||||
cd \$sourceRoot
|
|
||||||
}
|
|
||||||
" [unpackW];
|
|
||||||
|
|
||||||
|
|
||||||
defPatchW = FullDepEntry "
|
|
||||||
patchW() {
|
|
||||||
if test -n \"\$patchPhase\"; then
|
|
||||||
eval \"\$patchPhase\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z \"\$patchFlags\"; then
|
|
||||||
patchFlags=\"-p1\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i in \$patches; do
|
|
||||||
header \"applying patch \$i\" 3
|
|
||||||
local uncompress=cat
|
|
||||||
case \$i in
|
|
||||||
*.gz)
|
|
||||||
uncompress=gunzip
|
|
||||||
;;
|
|
||||||
*.bz2)
|
|
||||||
uncompress=bunzip2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
\$uncompress < \$i | patch \$patchFlags || fail
|
|
||||||
stopNest
|
|
||||||
done
|
|
||||||
}
|
|
||||||
" [getInputs]
|
|
||||||
|
|
||||||
defPatchPhase = FullDepEntry "
|
|
||||||
patchPhase() {
|
|
||||||
if test -z \"\$patchPhase\" -a -z \"\$patches\"; then return; fi
|
|
||||||
header \"patching sources\"
|
|
||||||
startLog \"patch\"
|
|
||||||
patchW
|
|
||||||
stopLog
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [defPatchW];
|
|
||||||
|
|
||||||
defFixLibTool = FullDepEntry "fixLibtool() {
|
|
||||||
sed 's^eval sys_lib_.*search_path=.*^^' < \$1 > \$1.tmp
|
|
||||||
mv \$1.tmp \$1
|
|
||||||
}
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
defConfigureW = FullDepEntry "
|
|
||||||
configureW() {
|
|
||||||
if test -n \"\$configurePhase\"; then
|
|
||||||
eval \"\$configurePhase\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval \"\$preConfigure\"
|
|
||||||
|
|
||||||
if test -z \"\$configureScript\"; then
|
|
||||||
configureScript=./configure
|
|
||||||
if ! test -x \$configureScript; then
|
|
||||||
echo \"no configure script, doing nothing\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z \"\$dontFixLibtool\"; then
|
|
||||||
for i in \$(find . -name \"ltmain.sh\"); do
|
|
||||||
echo \"fixing libtool script \$i\"
|
|
||||||
fixLibtool \$i
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z \"\$dontAddPrefix\"; then
|
|
||||||
configureFlags=\"--prefix=\$prefix \$configureFlags\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo \"configure flags: \$configureFlags \${configureFlagsArray[@]}\"
|
|
||||||
\$configureScript \$configureFlags\"\${configureFlagsArray[@]}\" || fail
|
|
||||||
|
|
||||||
eval \"\$postConfigure\"
|
|
||||||
}
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
|
|
||||||
defConfigurePhase = FullDepEntry "
|
|
||||||
configurePhase() {
|
|
||||||
header \"configuring\"
|
|
||||||
startLog \"configure\"
|
|
||||||
configureW
|
|
||||||
stopLog
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [defConfigureW];
|
|
||||||
|
|
||||||
defBuildW = FullDepEntry "
|
|
||||||
buildW() {
|
|
||||||
if test -n \"\$buildPhase\"; then
|
|
||||||
eval \"\$buildPhase\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval \"\$preBuild\"
|
|
||||||
|
|
||||||
echo \"make flags: \$makeFlags \${makeFlagsArray[@]} \$buildFlags \${buildFlagsArray[@]}\"
|
|
||||||
make \
|
|
||||||
\$makeFlags \"\${makeFlagsArray[@]}\" \
|
|
||||||
\$buildFlags \"\${buildFlagsArray[@]}\" || fail
|
|
||||||
|
|
||||||
eval \"\$postBuild\"
|
|
||||||
}
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
defBuildPhase = FullDepEntry "
|
|
||||||
buildPhase() {
|
|
||||||
if test \"\$dontBuild\" = 1; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
header \"building\"
|
|
||||||
startLog \"build\"
|
|
||||||
buildW
|
|
||||||
stopLog
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [defBuildW];
|
|
||||||
|
|
||||||
|
|
||||||
defCheckW = FullDepEntry "
|
|
||||||
checkW() {
|
|
||||||
if test -n \"\$checkPhase\"; then
|
|
||||||
eval \"\$checkPhase\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z \"\$checkTarget\"; then
|
|
||||||
checkTarget=\"check\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo \"check flags: \$makeFlags \${makeFlagsArray[@]} \$checkFlags \${checkFlagsArray[@]}\"
|
|
||||||
make \
|
|
||||||
\$makeFlags \"\${makeFlagsArray[@]}\" \
|
|
||||||
\$checkFlags \"\${checkFlagsArray[@]}\" \$checkTarget || fail
|
|
||||||
}
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
|
|
||||||
defCheckPhase = FullDepEntry "
|
|
||||||
checkPhase() {
|
|
||||||
if test \"\$doCheck\" != 1; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
header \"checking\"
|
|
||||||
startLog \"check\"
|
|
||||||
checkW
|
|
||||||
stopLog
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [checkPhase];
|
|
||||||
|
|
||||||
|
|
||||||
defPatchElf = FullDepEntry "
|
|
||||||
patchELF() {
|
|
||||||
# Patch all ELF executables and shared libraries.
|
|
||||||
header \"patching ELF executables and libraries\"
|
|
||||||
find \"\$prefix\" \( \
|
|
||||||
\( -type f -a -name \"*.so*\" \) -o \
|
|
||||||
\( -type f -a -perm +0100 \) \
|
|
||||||
\) -print -exec patchelf --shrink-rpath {} \;
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [initPath defNest];
|
|
||||||
|
|
||||||
|
|
||||||
defInstallW = FullDepEntry "
|
|
||||||
installW() {
|
|
||||||
if test -n \"\$installPhase\"; then
|
|
||||||
eval \"\$installPhase\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval \"\$preInstall\"
|
|
||||||
|
|
||||||
ensureDir \"\$prefix\"
|
|
||||||
|
|
||||||
if test -z \"\$installCommand\"; then
|
|
||||||
if test -z \"\$installTargets\"; then
|
|
||||||
installTargets=install
|
|
||||||
fi
|
|
||||||
echo \"install flags: \$installTargets \$makeFlags \${makeFlagsArray[@]} \$installFlags \${installFlagsArray[@]}\"
|
|
||||||
make \$installTargets \
|
|
||||||
\$makeFlags \"\${makeFlagsArray[@]}\" \
|
|
||||||
\$installFlags \"\${installFlagsArray[@]}\" || fail
|
|
||||||
else
|
|
||||||
eval \"\$installCommand\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval \"\$postInstall\"
|
|
||||||
}
|
|
||||||
" [initPath];
|
|
||||||
|
|
||||||
|
|
||||||
defInstallPhase = FullDepEntry "
|
|
||||||
installPhase() {
|
|
||||||
if test \"\$dontInstall\" = 1; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
header \"installing\"
|
|
||||||
startLog \"install\"
|
|
||||||
installW
|
|
||||||
stopLog
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [defInstallW defNest defStartStopLog];
|
|
||||||
|
|
||||||
|
|
||||||
defFixupW = FullDepEntry "
|
|
||||||
|
|
||||||
# The fixup phase performs generic, package-independent, Nix-related
|
|
||||||
# stuff, like running patchelf and setting the
|
|
||||||
# propagated-build-inputs. It should rarely be overriden.
|
|
||||||
fixupW() {
|
|
||||||
if test -n "$fixupPhase"; then
|
|
||||||
eval "$fixupPhase"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval "$preFixup"
|
|
||||||
|
|
||||||
forceShare=${forceShare:=man doc info}
|
|
||||||
if test -n "$forceShare"; then
|
|
||||||
for d in $forceShare; do
|
|
||||||
if test -d "$prefix/$d"; then
|
|
||||||
if test -d "$prefix/share/$d"; then
|
|
||||||
echo "Both $d/ and share/$d/ exists!"
|
|
||||||
else
|
|
||||||
echo Fixing location of $dir/ subdirectory
|
|
||||||
ensureDir $prefix/share
|
|
||||||
if test -w $prefix/share; then
|
|
||||||
mv -v $prefix/$d $prefix/share
|
|
||||||
ln -sv share/$d $prefix
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "No $d/ subdirectory, skipping."
|
|
||||||
fi
|
|
||||||
done;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# TODO : strip _only_ ELF executables, and return || fail here...
|
|
||||||
if test -z "$dontStrip"; then
|
|
||||||
echo "Stripping debuging symbols from files in"
|
|
||||||
stripDirs "${stripDebugList:-lib}" -S
|
|
||||||
echo "Stripping all symbols from files in"
|
|
||||||
stripDirs "${stripAllList:-bin sbin}" -s
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then
|
|
||||||
patchELF "$prefix"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$propagatedBuildInputs"; then
|
|
||||||
ensureDir "$out/nix-support"
|
|
||||||
echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$setupHook"; then
|
|
||||||
ensureDir "$out/nix-support"
|
|
||||||
substituteAll "$setupHook" "$out/nix-support/setup-hook"
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval "$postFixup"
|
|
||||||
}
|
|
||||||
" [defPatchElf initPath];
|
|
||||||
|
|
||||||
|
|
||||||
defFixupPhase = FullDepEntry "
|
|
||||||
fixupPhase() {
|
|
||||||
if test \"\$dontFixup\" = 1; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
header \"post-installation fixup\"
|
|
||||||
startLog \"fixup\"
|
|
||||||
fixupW
|
|
||||||
stopLog
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [defFixupW defNest defStartStopLog];
|
|
||||||
|
|
||||||
|
|
||||||
defDistW = FullDepEntry "
|
|
||||||
distW() {
|
|
||||||
if test -n \"\$distPhase\"; then
|
|
||||||
eval \"\$distPhase\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval \"\$preDist\"
|
|
||||||
|
|
||||||
if test -z \"\$distTarget\"; then
|
|
||||||
distTarget=\"dist\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo \"dist flags: \$distFlags \${distFlagsArray[@]}\"
|
|
||||||
make \$distFlags \"\${distFlagsArray[@]}\" \$distTarget || fail
|
|
||||||
|
|
||||||
if test \"\$dontCopyDist\" != 1; then
|
|
||||||
ensureDir \"\$out/tarballs\"
|
|
||||||
|
|
||||||
if test -z \"\$tarballs\"; then
|
|
||||||
tarballs=\"*.tar.gz\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Note: don't quote \$tarballs, since we explicitly permit
|
|
||||||
# wildcards in there.
|
|
||||||
cp -pvd \$tarballs \$out/tarballs
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval \"\$postDist\"
|
|
||||||
}
|
|
||||||
" [initPath ];
|
|
||||||
|
|
||||||
|
|
||||||
defDistPhase = FullDepEntry "
|
|
||||||
distPhase() {
|
|
||||||
if test \"\$doDist\" != 1; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
header \"creating distribution\"
|
|
||||||
startLog \"dist\"
|
|
||||||
distW
|
|
||||||
stopLog
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [defDistW defNest defStartStopLog];
|
|
||||||
|
|
||||||
defGenericBuild = FullDepEntry "
|
|
||||||
genericBuild() {
|
|
||||||
header \"building \$out\"
|
|
||||||
|
|
||||||
if test -n \"\$buildCommand\"; then
|
|
||||||
eval \"\$buildCommand\"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z \"\$phases\"; then
|
|
||||||
phases=\"unpackPhase patchPhase configurePhase buildPhase checkPhase \
|
|
||||||
installPhase fixupPhase distPhase\";
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i in \$phases; do
|
|
||||||
dumpVars
|
|
||||||
eval \"\$i\"
|
|
||||||
done
|
|
||||||
|
|
||||||
stopNest
|
|
||||||
}
|
|
||||||
" [defUnpackPhase defBuildPhase defInstallPhase];
|
|
||||||
|
|
||||||
doDumpVars = FullDepEntry "
|
|
||||||
dumpVars
|
|
||||||
" [defDumpVars];
|
|
|
@ -11,22 +11,24 @@ stdenv.mkDerivation {
|
||||||
url = ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz;
|
url = ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz;
|
||||||
md5 = "cd3f3eb54446be6003156158d51f4884";
|
md5 = "cd3f3eb54446be6003156158d51f4884";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
# Lots of patches from Gentoo, in particular splash screen support
|
||||||
# Patch to add primitive splash screen support (not the fancy SUSE gfxmenu stuff).
|
# (not the fancy SUSE gfxmenu stuff though). Also a fix for boot
|
||||||
# With this you can set splashimage=foo.xpm.gz in menu.lst to get
|
# failures on systems with more than 2 GiB RAM.
|
||||||
# a 640x480, 14-colour background.
|
gentooPatches = fetchurl {
|
||||||
(fetchurl {
|
url = mirror://gentoo/distfiles/grub-0.97-patches-1.4.tar.bz2;
|
||||||
url = "http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/*checkout*/system/grub-gfx/grub-0.97-graphics.patch?rev=HEAD&cvsroot=AUR&only_with_tag=CURRENT&content-type=text/plain";
|
sha256 = "1nki5q1b61ahxcmnw6mq7b8ghcysri4lj7q6dx8iqixrvrpxj399";
|
||||||
sha256 = "0m6min9cbj71kvp0kxkxdq8dx2dwm3dj0rd5sjz5xdl13ihaj5hy";
|
};
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
# Autoconf/automake required for the splashimage patch.
|
# Autoconf/automake required for the splashimage patch.
|
||||||
buildInputs = [autoconf automake];
|
buildInputs = [autoconf automake];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
unpackFile $gentooPatches
|
||||||
|
for i in patch/*.patch; do
|
||||||
|
echo "applying patch $i"
|
||||||
|
patch -p1 < $i || patch -p0 < $i
|
||||||
|
done
|
||||||
autoreconf
|
autoreconf
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
7
pkgs/tools/misc/mc/builder.sh
Normal file
7
pkgs/tools/misc/mc/builder.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
tar xfvz $src
|
||||||
|
cd mc-*
|
||||||
|
./configure --prefix=$out --with-screen=ncurses
|
||||||
|
make
|
||||||
|
make install
|
11
pkgs/tools/misc/mc/default.nix
Normal file
11
pkgs/tools/misc/mc/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{stdenv, fetchurl, pkgconfig, glib, ncurses, libX11}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "mc-4.6.1";
|
||||||
|
src = fetchurl {
|
||||||
|
url = http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.1.tar.gz;
|
||||||
|
md5 = "18b20db6e40480a53bac2870c56fc3c4";
|
||||||
|
};
|
||||||
|
buildInputs = [pkgconfig glib ncurses libX11];
|
||||||
|
builder = ./builder.sh;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
args : with args;
|
args : with args;
|
||||||
with builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
fetchcvs {
|
fetchcvs {
|
||||||
url = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs";
|
url = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs";
|
||||||
|
@ -12,6 +12,7 @@ args : with args;
|
||||||
e2fsprogs gnomevfs pkgconfig GConf];
|
e2fsprogs gnomevfs pkgconfig GConf];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
} null; /* null is a terminator for sumArgs */
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
let build = FullDepEntry ("
|
let build = FullDepEntry ("
|
||||||
cd deps
|
cd deps
|
||||||
sed -e 's/^CPP/#&/ ; s/^# CPP=gcc/CPP=gcc/' -i Makefile.camlidl
|
sed -e 's/^CPP/#&/ ; s/^# CPP=gcc/CPP=gcc/' -i Makefile.camlidl
|
||||||
|
@ -41,7 +42,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "relfs-"+version;
|
name = "relfs-"+version;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure [build doMakeInstall doForceShare doPropagate]);
|
(textClosure localDefs [build doMakeInstall doForceShare doPropagate]);
|
||||||
meta = {
|
meta = {
|
||||||
description = "
|
description = "
|
||||||
Relational FS over FUSE.
|
Relational FS over FUSE.
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
assert stdenv.isLinux -> libcap != null;
|
assert stdenv.isLinux -> libcap != null;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "ntp-4.2.4p3";
|
name = "ntp-4.2.4p4";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.4p3.tar.gz;
|
url = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.4p4.tar.gz;
|
||||||
sha256 = "077y1hw6v0qnp3j3w3pcxgsc76waswqhwsbzfj3jqc79jfh65jv9";
|
sha256 = "0im89i51ap7aqlhxq5isz5xg4h8w8ahwdhir8la3c83h3p47fcmv";
|
||||||
};
|
};
|
||||||
configureFlags = "
|
configureFlags = ''
|
||||||
--without-crypto
|
--without-crypto
|
||||||
${if stdenv.isLinux then "--enable-linuxcaps" else ""}
|
${if stdenv.isLinux then "--enable-linuxcaps" else ""}
|
||||||
";
|
'';
|
||||||
buildInputs = if stdenv.isLinux then [libcap] else [];
|
buildInputs = if stdenv.isLinux then [libcap] else [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
source $stdenv/setup
|
source $stdenv/setup
|
||||||
source $makeWrapper
|
|
||||||
|
|
||||||
# Workaround for:
|
# Workaround for:
|
||||||
# File "...-python-2.4.4/lib/python2.4/posixpath.py", line 62, in join
|
# File "...-python-2.4.4/lib/python2.4/posixpath.py", line 62, in join
|
||||||
|
@ -20,12 +19,9 @@ installPhase() {
|
||||||
|
|
||||||
# Create wrappers that set the environment correctly.
|
# Create wrappers that set the environment correctly.
|
||||||
for i in $(cd $out/bin && ls); do
|
for i in $(cd $out/bin && ls); do
|
||||||
# Note: the GUI apps except to be in a directory called `bin',
|
wrapProgram $out/bin/$i \
|
||||||
# so don't move them.
|
|
||||||
mv $out/bin/$i $out/bin/.orig-$i
|
|
||||||
makeWrapper $out/bin/.orig-$i $out/bin/$i \
|
|
||||||
--set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH"
|
--set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
genericBuild
|
genericBuild
|
||||||
|
|
|
@ -6,18 +6,16 @@
|
||||||
assert gui -> wxPython != null;
|
assert gui -> wxPython != null;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "bittorrent-5.0.7";
|
name = "bittorrent-5.2.0";
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://download.bittorrent.com/dl/BitTorrent-5.0.7.tar.gz;
|
url = http://download.bittorrent.com/dl/BitTorrent-5.2.0.tar.gz;
|
||||||
sha256 = "09m2qlhzbc6j1hf6fniri0hh6cy6ccgwi2sph65bpjrc417l94gj";
|
sha256 = "0lg54x5y2k1cb7vpj7hanlnvzqa2k3v24qq0g6fsycjk4n8dky02";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [python pycrypto twisted]
|
buildInputs = [python pycrypto twisted makeWrapper]
|
||||||
++ (if gui then [wxPython] else []);
|
++ stdenv.lib.optional gui wxPython;
|
||||||
|
|
||||||
inherit makeWrapper;
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "The original client for the BitTorrent peer-to-peer file sharing protocol";
|
description = "The original client for the BitTorrent peer-to-peer file sharing protocol";
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
, stateDir ? "/nix/var"
|
, stateDir ? "/nix/var"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let version = "0.12pre10069"; in
|
let version = "0.12pre10154"; in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "nix-${version}";
|
name = "nix-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://nix.cs.uu.nl/dist/nix/nix-${version}/nix-${version}.tar.bz2";
|
url = "http://nix.cs.uu.nl/dist/nix/nix-${version}/nix-${version}.tar.bz2";
|
||||||
md5 = "bf05ebe9463f0453beae2c43f05ac13d";
|
md5 = "9e5833e34ade23852a1270d0f2a98ce2";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [perl curl openssl];
|
buildInputs = [perl curl openssl];
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue