parent
4de89f61b0
commit
da57804fff
@ -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"; |
||||
}; |
||||
} |
@ -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 { |
||||
name = "cvs2svn-1.5.1"; |
||||
name = "cvs2svn-2.0.1"; |
||||
|
||||
src = fetchurl { |
||||
url = http://cvs2svn.tigris.org/files/documents/1462/36129/cvs2svn-1.5.1.tar.gz; |
||||
md5 = "d1e42ea51b373be0023f2b3f6b80ec01"; |
||||
url = http://cvs2svn.tigris.org/files/documents/1462/39919/cvs2svn-2.0.1.tar.gz; |
||||
sha256 = "1pgbyxzgn22lnw3h5c2nd8z46pkk863jg3fgh9pqa1jihsx1cg1j"; |
||||
}; |
||||
|
||||
buildInputs = [python bsddb3]; |
||||
buildInputs = [python makeWrapper]; |
||||
|
||||
buildPhase = "true"; |
||||
installPhase = " |
||||
installPhase = '' |
||||
python ./setup.py install --prefix=$out |
||||
|
||||
source ${makeWrapper} |
||||
mv $out/bin/cvs2svn $out/bin/.orig-cvs2svn |
||||
makeWrapper $out/bin/.orig-cvs2svn $out/bin/cvs2svn \\ |
||||
--set PYTHONPATH \"$(toPythonPath $out):$(toPythonPath ${bsddb3}):$PYTHONPATH\" |
||||
"; |
||||
wrapProgram $out/bin/cvs2svn \ |
||||
--set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH" |
||||
''; |
||||
|
||||
/* !!! maybe we should absolutise the program names in |
||||
$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/; |
||||
}; |
||||
} |
||||
|
@ -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 |
||||
''; |
||||
|
||||
}) |
@ -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" |
@ -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; |
||||
} |
@ -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 |
@ -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; |
||||
} |
@ -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"; |
||||
} |
@ -0,0 +1,11 @@ |
||||
{cabal}: |
||||
|
||||
cabal.mkDerivation (self : { |
||||
pname = "Crypto"; |
||||
version = "4.1.0"; |
||||
sha256 = "0984c833c5dfa6f4d56fd6fb284db7b7cef6676dc7999a1436aa856becba2b8f"; |
||||
meta = { |
||||
description = "Several encryption algorithms for Haskell"; |
||||
}; |
||||
}) |
||||
|
@ -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"; |
||||
}; |
||||
}) |
@ -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"; |
||||
}; |
||||
}) |
||||
|
@ -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); |
||||
} |
@ -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 { |
||||
name = "uulib-0.9.2"; |
||||
src = fetchurl { |
||||
url = http://nix.cs.uu.nl/dist/tarballs/uulib-0.9.2-src.tar.gz; |
||||
md5 = "0cc9acc6a268e2bc5c8a954e67406e2d"; |
||||
cabal.mkDerivation (self : { |
||||
pname = "uulib"; |
||||
version = "0.9.5"; |
||||
sha256 = "38415725133af464de582dadc7d7e60b1aeb96344b18b239d176bf2181f98563"; |
||||
meta = { |
||||
description = "Fast Parser Combinators and Pretty Printing Combinators"; |
||||
}; |
||||
builder = ./builder.sh; |
||||
#buildInputs = [ ghc ]; |
||||
inherit ghc; |
||||
} |
||||
}) |
||||
|
@ -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 |
||||
''; |
||||
}) |
@ -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"; |
||||
}; |
||||
}) |
@ -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}: |
||||
|
||||
stdenv.mkDerivation |
||||
{ |
||||
name = "uuagc-0.9.2"; |
||||
|
||||
src = fetchurl { url = http://www.cs.uu.nl/~ariem/uuagc-0.9.2-src.tar.gz; |
||||
md5 = "cbac92287c9c0a858ccbfa37615d9f5f"; |
||||
}; |
||||
|
||||
buildInputs = [ghc uulib]; |
||||
|
||||
meta = { description = "The UUAG Compiler"; }; |
||||
} |
||||
{cabal, uulib}: |
||||
|
||||
cabal.mkDerivation (self : { |
||||
pname = "uuagc"; |
||||
version = "0.9.5"; |
||||
name = self.fname; |
||||
sha256 = "c5be435efa609f72c09e175dd5cf7835a060bd7eaf6634ec4cde72ea84b99f25"; |
||||
extraBuildInputs = [uulib]; |
||||
meta = { |
||||
description = "Attribute Grammar System of Universiteit Utrecht"; |
||||
}; |
||||
}) |
||||
|
@ -1,23 +1,12 @@ |
||||
{stdenv, fetchurl, ghc, perl}: |
||||
|
||||
stdenv.mkDerivation { |
||||
name = "alex-2.1.0"; |
||||
src = fetchurl { |
||||
url = http://www.haskell.org/alex/dist/2.1.0/alex-2.1.0.tar.gz; |
||||
sha1 = "37599b7be5249d639b3a5a3fdc61907dc4dad660"; |
||||
{cabal, perl}: |
||||
|
||||
cabal.mkDerivation (self : { |
||||
pname = "alex"; |
||||
version = "2.2"; |
||||
name = self.fname; |
||||
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 |
||||
"; |
||||
} |
||||
}) |
||||
|
@ -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]; |
||||
}) |
@ -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. |
||||
"; |
||||
}; |
||||
} |
||||
|
@ -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]; |
||||
} |
@ -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 |
@ -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"; |
||||
}; |
||||
} |
@ -0,0 +1,9 @@ |
||||
buildInputs="$expat $erlang $zlib $openssl" |
||||
|
||||
source $stdenv/setup |
||||
|
||||
tar xfvz $src |
||||
cd $name/src |
||||
./configure --prefix=$out |
||||
make |
||||
make install |
@ -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]; |
@ -0,0 +1,7 @@ |
||||
source $stdenv/setup |
||||
|
||||
tar xfvz $src |
||||
cd mc-* |
||||
./configure --prefix=$out --with-screen=ncurses |
||||
make |
||||
make install |
@ -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; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue