mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
revert of my last commit to stdenv-update nix-env -qa \* --out-path works for me again
- sorry for the inconvinience svn path=/nixpkgs/branches/stdenv-updates/; revision=11000
This commit is contained in:
parent
173ae78b85
commit
2d6940061e
5 changed files with 108 additions and 205 deletions
|
@ -7,9 +7,9 @@ if test -n "$tag"; then
|
|||
tagflags="--tag=$tag"
|
||||
fi
|
||||
|
||||
header "getting $url $partial ${tagtext} into $out"
|
||||
header "getting $url ${tagtext}into $out"
|
||||
|
||||
darcs get --no-pristine-tree $partial $tagflags "$url" "$out"
|
||||
darcs get --no-pristine-tree --partial $tagflags "$url" "$out"
|
||||
# remove metadata, because it can change
|
||||
rm -rf "$out/_darcs"
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
{stdenv, darcs, nix}: {url, tag ? null, md5, partial ? true}:
|
||||
{stdenv, darcs, nix}: {url, tag ? null, md5}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "fetchdarcs";
|
||||
builder = ./builder.sh;
|
||||
buildInputs = [darcs nix];
|
||||
partial = if partial then "--partial" else "";
|
||||
|
||||
# Nix <= 0.7 compatibility.
|
||||
id = md5;
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
args: with args; with lib;
|
||||
args: with args; with lib; with annotatedDerivations;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit suffix name ghc readline ncurses;
|
||||
inherit suffix name ghc ;
|
||||
|
||||
buildInputs = (libraries ++ [ghcPkgUtil]);
|
||||
tags = map (x : sourceWithTagsDerivation ((lib.traceWhatis x).passthru.sourceWithTags))
|
||||
(uniqList { inputList= filter annotatedWithSourceAndTagInfo libraries; } );
|
||||
buildInputs = map delAnnotation (libraries ++ [ghcPkgUtil]);
|
||||
#tags = if (installSourceAndTags == true) then
|
||||
# map sourceWithTagsDerivation ( uniqList { inputList =
|
||||
# ( filterAnnotated ( concatLists (map uniqAnnotatedDeps libraries ) ) ) ; } )
|
||||
# else [];
|
||||
tags = map (x : sourceWithTagsDerivation (x.sourceWithTags))
|
||||
(uniqList { inputList= filter annotatedWithSourceAndTagInfo libraries; } );
|
||||
|
||||
phases="installPhase";
|
||||
|
||||
|
@ -19,15 +23,16 @@ stdenv.mkDerivation {
|
|||
app=$(ls -al $ghc/bin/$a | sed -n 's%.*-> \\(.*\\)%\\1%p');
|
||||
cat > \"\$out/bin/\$a$suffix\" << EOF
|
||||
#!`type -f sh | gawk '{ print $3; }'`
|
||||
export LIBRARY_PATH=\$readline/lib:\$ncurses/lib
|
||||
GHC_PACKAGE_PATH=\${GHC_PACKAGE_PATH}\${g} \$ghc/bin/$app \"\\\$@\"
|
||||
EOF
|
||||
chmod +x \"\$out/bin/\$a$suffix\"
|
||||
done
|
||||
|
||||
ensureDir \$out/src
|
||||
ensureDir \$out/{src,tags}
|
||||
for i in \$tags; do
|
||||
ln -s \$i/src/* \$out/src
|
||||
for path in src tags; do
|
||||
ln -s \$i/\$path/* \$out/\$path
|
||||
done
|
||||
done
|
||||
";
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ ghcPkgUtil, gnum4, perl, ghcboot, stdenv, fetchurl, recurseIntoAttrs, gmp, readline, lib, hasktags, ctags } :
|
||||
{ ghcPkgUtil, gnum4, perl, ghcboot, stdenv, fetchurl, recurseIntoAttrs, gmp, readline, lib, annotatedDerivations, hasktags, ctags } :
|
||||
with annotatedDerivations;
|
||||
rec {
|
||||
|
||||
/* What's in here?
|
||||
|
@ -110,7 +111,7 @@ rec {
|
|||
deps = [ x.base x.old_locale x.old_time x.filepath ];};
|
||||
filepath = { name = "filepath-1.1.0.0"; srcDir = "libraries/filepath";
|
||||
deps = [ x.base ];};
|
||||
ghc = { name = "ghc-${version}"; srcDir = "compiler";
|
||||
ghc = { name = "ghc-${version}"; srcDir = "libraries/Cabal";
|
||||
deps = [ x.base x.old_locale x.old_time x.filepath
|
||||
x.directory x.array x.containers x.hpc x.bytestring
|
||||
x.pretty x.packedstring x.template_haskell x.unix
|
||||
|
@ -141,7 +142,7 @@ rec {
|
|||
name = "rts-1.0"; srcDir = "rts"; # TODO: Doesn't have .hs files so I should use ctags if creating tags at all
|
||||
deps = [];
|
||||
createTagFiles = [
|
||||
{ name = "${name}_haskell";
|
||||
{ name = "${name}_haskell_tags";
|
||||
tagCmd = "${toString ctags}/bin/ctags -R .;mv tags \$TAG_FILE"; }
|
||||
];
|
||||
};
|
||||
|
@ -152,24 +153,30 @@ rec {
|
|||
};
|
||||
|
||||
toDerivation = attrs : with attrs;
|
||||
rec {
|
||||
inherit name;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit (attrs) name;
|
||||
#aDeps = concatLists ( catAttrs ( subsetmap id args [ "buildInputs" "propagatedBuildInputs" ] ) );
|
||||
aDeps = deps;
|
||||
|
||||
# dummy derivation, only creates setup-hook for package database located in the ghc derivation
|
||||
aDeriv = stdenv.mkDerivation {
|
||||
inherit name;
|
||||
phases = "buildPhase fixupPhase";
|
||||
buildInputs = [ ghcPkgUtil ];
|
||||
propagatedBuildInputs = [ ghc ] ++ attrs.deps;
|
||||
buildPhase = "setupHookRegisteringPackageDatabase \"${ghc}/lib/ghc-${ghc.version}/${attrs.name}.conf\"";
|
||||
passthru = {
|
||||
sourceWithTags = {
|
||||
src = ghc.src;
|
||||
inherit srcDir;
|
||||
name = attrs.name + "-src-with-tags";
|
||||
createTagFiles = lib.maybeAttr "createTagFiles" [
|
||||
{ name = "${attrs.name}_haskell";
|
||||
tagCmd = "${toString hasktags}/bin/hasktags-modified --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; }
|
||||
] attrs;
|
||||
};
|
||||
};
|
||||
propagatedBuildInputs = [ ghc ] ++ map delAnnotation attrs.deps;
|
||||
buildPhase = "setupHookRegisteringPackageDatabase \"${ghc}/lib/ghc-${ghc.version}/${name}.conf\"";
|
||||
};
|
||||
|
||||
sourceWithTags = {
|
||||
src = ghc.src;
|
||||
inherit srcDir;
|
||||
name = name + "-src-with-tags";
|
||||
createTagFiles = lib.maybeAttr "createTagFiles" [
|
||||
{ name = "${name}_haskell_tags";
|
||||
tagCmd = "${toString hasktags}/bin/hasktags-modified --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; }
|
||||
] attrs;
|
||||
};
|
||||
};
|
||||
derivations = with lib; builtins.listToAttrs (lib.concatLists ( lib.mapRecordFlatten
|
||||
( n : attrs : let d = (toDerivation attrs); in [ (nv n d) (nv attrs.name d) ] ) pkgs ) );
|
||||
|
|
|
@ -127,46 +127,36 @@ rec {
|
|||
annotatedDerivations = (import ../lib/annotatedDerivations.nix) { inherit lib; };
|
||||
|
||||
# optional srcDir
|
||||
annotatedWithSourceAndTagInfo = x : (x ? passthru && x.passthru ? sourceWithTags);
|
||||
annotatedWithSourceAndTagInfo = x : (x ? sourceWithTags);
|
||||
|
||||
# createTagFiles = [ { name = "my_tag_name_without_suffix", tagCmd = "ctags -R . -o \$TAG_FILE"; } ]
|
||||
# example arguments see annotatedGhcCabalDerivation
|
||||
# tag command must create file named $TAG_FILE
|
||||
sourceWithTagsDerivation = {name, src, srcDir ? ".", tagSuffix ? "_tags", createTagFiles ? []} :
|
||||
stdenv.mkDerivation {
|
||||
sourceWithTagsDerivation = args: with args;
|
||||
let createTagFiles = (lib.maybeAttr "createTagFiles" [] args ); in
|
||||
stdenv.mkDerivation {
|
||||
phases = "unpackPhase buildPhase";
|
||||
inherit src srcDir tagSuffix;
|
||||
name = "${name}-source-with-tags";
|
||||
inherit (args) src name;
|
||||
srcDir = (lib.maybeAttr "srcDir" "." args);
|
||||
# using separate tag directory so that you don't have to glob that much files when starting your editor
|
||||
# is this a good choice?
|
||||
buildPhase = "
|
||||
SRC_DEST=\$out/src/\$name
|
||||
ensureDir \$SRC_DEST
|
||||
t=\$out/tags/\$name
|
||||
ensureDir \$SRC_DEST \$t
|
||||
cp -r \$srcDir \$SRC_DEST"
|
||||
+ lib.defineShList "sh_list_names" (lib.catAttrs "name" createTagFiles)
|
||||
+ lib.defineShList "sh_list_cmds" (lib.catAttrs "tagCmd" createTagFiles)
|
||||
+ "cd \$SRC_DEST
|
||||
for a in `seq 0 \${#sh_list}`; do
|
||||
TAG_FILE=\"\$SRC_DEST/\"\${sh_list_names[\$a]}\$tagSuffix
|
||||
TAG_FILE=\"\$SRC_DEST/\"\${sh_list_names[\$a]}
|
||||
cmd=\"\${sh_list_cmds[\$a]}\"
|
||||
echo running tag cmd \"\$cmd\" in `pwd`
|
||||
eval \"\$cmd\";
|
||||
ln -s \$TAG_FILE \"\$t/\"\${sh_list_names[\$a]}
|
||||
done
|
||||
";
|
||||
};
|
||||
# example usage
|
||||
testSourceWithTags = sourceWithTagsDerivation (ghc68_extra_libs ghcsAndLibs.ghc68).happs_server_darcs.sourceWithTags;
|
||||
|
||||
addCTaggingInfo = deriv :
|
||||
deriv // {
|
||||
passthru = {
|
||||
sourceWithTags = {
|
||||
inherit (deriv) src;
|
||||
name = "${deriv.name}-source-ctags";
|
||||
createTagFiles = [
|
||||
{ inherit (deriv) name;
|
||||
tagCmd = "${toString ctags}/bin/ctags --sort=yes -o \$TAG_FILE -R ."; }
|
||||
];
|
||||
};
|
||||
testSourceWithTags = sourceWithTagsDerivation (ghc68_extra_libs ghcsAndLibs.ghc68).mtl.sourceWithTags;
|
||||
|
||||
# Return an attribute from the Nixpkgs configuration file, or
|
||||
|
@ -244,7 +234,7 @@ rec {
|
|||
let co = lib.chooseOptionsByFlags { inherit args flagConfig optionals defaults collectExtraPhaseActions; }; in
|
||||
args.stdenv.mkDerivation (
|
||||
{
|
||||
inherit (co) configureFlags buildInputs propagatedBuildInputs /*flags*/;
|
||||
inherit (co) configureFlags buildInputs /*flags*/;
|
||||
} // extraAttrs co // co.pass // co.flags_prefixed );
|
||||
|
||||
|
||||
|
@ -321,13 +311,6 @@ rec {
|
|||
inherit stdenv darcs nix;
|
||||
};
|
||||
|
||||
# only temporarely / don't know yet wether it's save to switch
|
||||
# but I have trouble getting HAppS repos
|
||||
fetchdarcs_2pre = import ../build-support/fetchdarcs {
|
||||
inherit stdenv nix;
|
||||
darcs = darcs_2_pre;
|
||||
};
|
||||
|
||||
fetchsvn = import ../build-support/fetchsvn {
|
||||
inherit stdenv subversion openssh;
|
||||
sshSupport = true;
|
||||
|
@ -1120,12 +1103,6 @@ rec {
|
|||
inherit fetchurl stdenv gawk;
|
||||
};
|
||||
|
||||
flapjax = import ../development/compilers/flapjax {
|
||||
inherit fetchurl stdenv;
|
||||
ghc = ghcsAndLibs.ghc68.ghc;
|
||||
libs = with (ghc68_extra_libs ghcsAndLibs.ghc68 // ghcsAndLibs.ghc68.core_libs); [ mtl parsec random ];
|
||||
};
|
||||
|
||||
g77 = import ../build-support/gcc-wrapper {
|
||||
name = "g77";
|
||||
nativeTools = false;
|
||||
|
@ -1223,21 +1200,18 @@ rec {
|
|||
{ ghcPkgUtil = ../development/libraries/haskell/generic/ghcPkgUtil.sh; }
|
||||
"mkdir -p $out/nix-support; cp $ghcPkgUtil \$out/nix-support/setup-hook;";
|
||||
|
||||
ghcsAndLibs =
|
||||
ghcsAndLibs =
|
||||
assert builtins ? listToAttrs;
|
||||
recurseIntoAttrs (import ../development/compilers/ghcs {
|
||||
inherit ghcboot fetchurl stdenv recurseIntoAttrs perl gnum4 gmp readline lib;
|
||||
inherit ghcPkgUtil hasktags ctags;
|
||||
inherit ghcPkgUtil annotatedDerivations hasktags ctags;
|
||||
});
|
||||
|
||||
# creates ghc-X-wl wich adds the passed libraries to the env var GHC_PACKAGE_PATH
|
||||
createGhcWrapper = { ghcPackagedLibs ? false, ghc, libraries, name, suffix ? "ghc_wrapper_${ghc.name}" } :
|
||||
import ../development/compilers/ghc/createGhcWrapper {
|
||||
inherit ghcPackagedLibs ghc name suffix libraries ghcPkgUtil
|
||||
lib sourceWithTagsDerivation annotatedWithSourceAndTagInfo
|
||||
readline ncurses stdenv;
|
||||
#inherit stdenv ghcPackagedLibs ghc name suffix libraries ghcPkgUtil
|
||||
# annotatedDerivations lib sourceWithTagsDerivation annotatedWithSourceAndTagInfo;
|
||||
inherit stdenv ghcPackagedLibs ghc name suffix libraries ghcPkgUtil
|
||||
annotatedDerivations lib sourceWithTagsDerivation annotatedWithSourceAndTagInfo;
|
||||
installSourceAndTags = true;
|
||||
};
|
||||
|
||||
|
@ -1250,10 +1224,10 @@ rec {
|
|||
# classic expression style.. seems to work fine
|
||||
# used now
|
||||
# goSrc contains source directory (containing the .cabal file)
|
||||
ghcCabalDerivation = args : with args;
|
||||
ghcCabalDerivation = args : null_ : with lib; with args;
|
||||
stdenv.mkDerivation ({
|
||||
goSrcDir = "cd ${srcDir}";
|
||||
inherit (args) name src propagatedBuildInputs;
|
||||
inherit name src propagatedBuildInputs;
|
||||
phases = "unpackPhase patchPhase buildPhase";
|
||||
buildInputs = (if (args ? buildInputs) then args.buildInputs else [])
|
||||
++ [ ghcPkgUtil ];
|
||||
|
@ -1282,21 +1256,28 @@ rec {
|
|||
|
||||
echo \"\$propagatedBuildInputs\" > \"\$out/nix-support/propagated-build-inputs\"
|
||||
";
|
||||
} // ( if args ? pass then args.pass else {} ) );
|
||||
} // (subsetmap id args [ "patchPhase" ]));
|
||||
|
||||
# creates annotated derivation (comments see above)
|
||||
addHasktagsTaggingInfo = deriv : deriv // {
|
||||
passthru = {
|
||||
sourceWithTags = {
|
||||
inherit (deriv) src;
|
||||
srcDir = if deriv ? srcDir then deriv.srcDir else ".";
|
||||
name = deriv.name + "-src-with-tags";
|
||||
createTagFiles = [
|
||||
{ name = "${deriv.name}_haskell";
|
||||
# tagCmd = "${toString ghcsAndLibs.ghc68.ghc}/bin/hasktags --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; }
|
||||
tagCmd = "${toString hasktags}/bin/hasktags-modified --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; }
|
||||
];
|
||||
};
|
||||
# creates annotated derivation (comments see above
|
||||
annotatedGhcCabalDerivation = args : null_ : with lib; with args;
|
||||
rec {
|
||||
inherit name;
|
||||
|
||||
#aDeps = concatLists ( catAttrs ( subsetmap id args [ "buildInputs" "propagatedBuildInputs" ] ) );
|
||||
aDeps = []; #TODO
|
||||
|
||||
aDeriv = ghcCabalDerivation (args // (annotatedDerivations.delAnnotationsFromInputs args) ) null;
|
||||
|
||||
# annotation data
|
||||
|
||||
sourceWithTags = {
|
||||
inherit src srcDir;
|
||||
name = name + "-src-with-tags";
|
||||
createTagFiles = [
|
||||
{ name = "${name}_haskell_tags";
|
||||
# tagCmd = "${toString ghcsAndLibs.ghc68.ghc}/bin/hasktags --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; }
|
||||
tagCmd = "${toString hasktags}/bin/hasktags-modified --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1328,33 +1309,6 @@ rec {
|
|||
src = fetchurl { url = "http://hackage.haskell.org/packages/archive/binary/0.4.1/binary-0.4.1.tar.gz";
|
||||
sha256 = "0jg5i1k5fz0xp1piaaf5bzhagqvfl3i73hlpdmgs4gc40r1q4x5v"; };
|
||||
};
|
||||
# using different name to not clash with postgresql
|
||||
postgresql_bindings = rec { name = "PostgreSQL-0.2"; p_deps = [x.base x.mtl postgresql x.haskell98];
|
||||
src = fetchurl { url = "http://hackage.haskell.org/packages/archive/PostgreSQL/0.2/PostgreSQL-0.2.tar.gz";
|
||||
sha256 = "0p5q3yc8ymgzzlc600h4mb9w86ncrgjdbpqfi49b2jqvkcx5bwrr"; };
|
||||
pass = {
|
||||
inherit postgresql;
|
||||
patchPhase = "echo 'extensions: MultiParamTypeClasses ForeignFunctionInterface EmptyDataDecls GeneralizedNewtypeDeriving FlexibleInstances UndecidableInstances' >> PostgreSQL.cabal
|
||||
echo \"extra-lib-dirs: \$postgresql/lib\" >> PostgreSQL.cabal
|
||||
echo \"extra-libraries: pq\" >> PostgreSQL.cabal
|
||||
";
|
||||
|
||||
};
|
||||
};
|
||||
#wash = rec { name = "WashNGo-2.12"; p_deps = [x.base x.mtl x.haskell98 ];
|
||||
# src = fetchurl { url = "http://www.informatik.uni-freiburg.de/~thiemann/WASH/WashNGo-2.12.tgz";
|
||||
# sha256 = "1dyc2062jpl3xdlm0n7xkz620h060g2i5ghnb32cn95brcj9fgrz"; };
|
||||
# patches = ../misc/WASHNGo_Patch_ghc682;
|
||||
# };
|
||||
|
||||
#hsql = rec { name = "hsql-1.7"; p_deps = [x.base x.mtl x.haskell98 x.old_time ];
|
||||
# src = fetchurl { url = "http://hackage.haskell.org/packages/archive/hsql/1.7/hsql-1.7.tar.gz";
|
||||
# sha256 = "0j2lkvg5c0x5gf2sy7zmmgrda0c3l73i9d6hyka2f15d5n1rfjc9"; };
|
||||
# patchPhase = "echo \"extra-lib-dirs: \$postgresql/lib\" >> *.cabal
|
||||
# echo 'build-depends: old-locale, old-time' >> *.cabal";
|
||||
# };
|
||||
|
||||
|
||||
# 1.13 is stable. There are more recent non stable versions
|
||||
haxml = rec { name = "HaXml-1.13.3"; p_deps = [ x.base x.rts x.directory x.process x.pretty x.containers x.filepath x.haskell98 ];
|
||||
src = fetchurl { url = "http://www.haskell.org/HaXml/${name}.tar.gz";
|
||||
|
@ -1379,40 +1333,33 @@ rec {
|
|||
parsep = { name = "parsep-0.1"; p_deps = [ x.base x.mtl x.bytestring ];
|
||||
src = fetchurl { url = "http://twan.home.fmf.nl/parsep/parsep-0.1.tar.gz";
|
||||
sha256 = "1y5pbs5mzaa21127cixsamahlbvmqzyhzpwh6x0nznsgmg2dpc9q"; };
|
||||
pass = { patchPhase = "pwd; sed -i 's/fps/bytestring/' *.cabal"; };
|
||||
patchPhase = "pwd; sed -i 's/fps/bytestring/' *.cabal";
|
||||
};
|
||||
time = { name = "time-1.1.2.0"; p_deps = [ x.base x.old_locale ];
|
||||
src = fetchurl { url = "http://hackage.haskell.org/packages/archive/time/1.1.2.0/time-1.1.2.0.tar.gz";
|
||||
sha256 = "0zm4qqczwbqzy2pk7wz5p1virgylwyzd9zxp0406s5zvp35gvl89"; };
|
||||
};
|
||||
|
||||
|
||||
# HAPPS - Libraries
|
||||
http_darcs = { name="http-darcs"; p_deps = [x.network x.parsec];
|
||||
src = bleeding_edge_source "http_darcs";
|
||||
#src = fetchdarcs { url = "http://darcs.haskell.org/http/"; md5 = "4475f858cf94f4551b77963d08d7257c"; };
|
||||
src = fetchdarcs { url = "http://darcs.haskell.org/http/"; md5 = "4475f858cf94f4551b77963d08d7257c"; };
|
||||
};
|
||||
syb_with_class_darcs = { name="syb-with-class-darcs"; p_deps = [x.template_haskell x.bytestring ];
|
||||
src =
|
||||
# fetchdarcs { url = "http://happs.org/HAppS/syb-with-class"; md5 = "b42336907f7bfef8bea73bc36282d6ac"; };
|
||||
bleeding_edge_source "syb_with_class"; # { url = "http://happs.org/HAppS/syb-with-class"; md5 = "b42336907f7bfef8bea73bc36282d6ac"; };
|
||||
src = fetchdarcs { url = "http://happs.org/HAppS/syb-with-class"; md5 = "b42336907f7bfef8bea73bc36282d6ac"; };
|
||||
};
|
||||
|
||||
happs_data_darcs = { name="HAppS-Data-darcs"; p_deps=[ x.base x.mtl x.template_haskell x.syb_with_class_darcs x.haxml x.happs_util_darcs x.regex_compat x.bytestring x.pretty x.binary ];
|
||||
src = bleeding_edge_source "happs_data"; # fetchdarcs { url = "http://happs.org/repos/HAppS-Data"; md5 = "10c505dd687e9dc999cb187090af9ba7"; };
|
||||
happs_data_darcs = { name="HAppS-Data-darcs"; p_deps=[ x.base x.mtl x.template_haskell x.syb_with_class_darcs x.haxml x.happs_util_darcs x.regex_compat x.bytestring x.pretty ];
|
||||
src = fetchdarcs { url = "http://happs.org/repos/HAppS-Data"; md5 = "10c505dd687e9dc999cb187090af9ba7"; };
|
||||
};
|
||||
happs_util_darcs = { name="HAppS-Util-darcs"; p_deps=[ x.base x.mtl x.hslogger x.template_haskell x.array x.bytestring x.old_time x.process x.directory ];
|
||||
src = bleeding_edge_source "happs_util"; # fetchdarcs { url = "http://happs.org/repos/HAppS-Util"; md5 = "693cb79017e522031c307ee5e59fc250"; };
|
||||
src = fetchdarcs { url = "http://happs.org/repos/HAppS-Util"; md5 = "693cb79017e522031c307ee5e59fc250"; };
|
||||
};
|
||||
|
||||
happs_state_darcs = { name="HAppS-State-darcs"; p_deps=[ x.base x.haxml
|
||||
x.mtl x.network x.stm x.template_haskell x.hslogger
|
||||
x.happs_util_darcs x.happs_data_darcs x.bytestring x.containers
|
||||
x.random x.old_time x.old_locale x.unix x.directory x.binary ];
|
||||
src = bleeding_edge_source "happs_state";
|
||||
#src = fetchdarcs { url = "http://happs.org/repos/HAppS-State";
|
||||
# md5 = "956e5c293b60f4a98148fedc5fa38acc";
|
||||
# };
|
||||
src = fetchdarcs { url = "http://happs.org/repos/HAppS-State";
|
||||
md5 = "956e5c293b60f4a98148fedc5fa38acc";
|
||||
};
|
||||
};
|
||||
happs_plugins_darcs = { name="HAppS-plugins-darcs"; p_deps=[ x.base x.mtl x.hslogger x.happs_util_darcs x.happs_data_darcs x.happs_state_darcs ];
|
||||
src = fetchdarcs { url = "http://happs.org/repos/HAppS-Util"; md5 = "693cb79017e522031c307ee5e59fc250"; };
|
||||
};
|
||||
# there is no .cabal yet
|
||||
#happs_smtp_darcs = { name="HAppS-smtp-darcs"; p_deps=[];
|
||||
|
@ -1422,40 +1369,35 @@ rec {
|
|||
happs_ixset_darcs = { name="HAppS-IxSet-darcs"; p_deps=[ x.base x.mtl
|
||||
x.hslogger x.happs_util_darcs x.happs_state_darcs x.happs_data_darcs
|
||||
x.template_haskell x.syb_with_class_darcs x.containers ];
|
||||
src = bleeding_edge_source "happs_ixset";
|
||||
#src = fetchdarcs { url = "http://happs.org/repos/HAppS-IxSet";
|
||||
src = fetchdarcs { url = "http://happs.org/repos/HAppS-IxSet";
|
||||
#md5 = "fa6b24517f09aa16e972f087430967fd";
|
||||
#tag = "0.9.2";
|
||||
# no tag
|
||||
#md5 = "fa6b24517f09aa16e972f087430967fd";
|
||||
#};
|
||||
md5 = "fa6b24517f09aa16e972f087430967fd";
|
||||
};
|
||||
};
|
||||
happs_server_darcs = { name="HAppS-Server-darcs"; p_deps=[x.haxml x.parsec x.mtl
|
||||
x.network x.regex_compat x.hslogger x.happs_data_darcs
|
||||
x.happs_util_darcs x.happs_state_darcs x.happs_ixset_darcs x.http_darcs
|
||||
x.template_haskell x.xhtml x.html x.bytestring x.random
|
||||
x.containers x.old_time x.old_locale x.directory x.unix];
|
||||
#src = fetchdarcs { url = "http://happs.org/repos/HAppS-HTTP"; md5 = "e1bb17eb30a39d30b8c34dffbf80edc2"; };
|
||||
src = bleeding_edge_source "happs_server_darcs";
|
||||
src = fetchdarcs { url = "http://happs.org/repos/HAppS-HTTP"; md5 = "e1bb17eb30a39d30b8c34dffbf80edc2"; };
|
||||
};
|
||||
# we need recent version of cabal (because only this supports --pkg-config propably) Thu Feb 7 14:54:07 CET 2008
|
||||
# is be added to buildInputs automatically
|
||||
cabal_darcs =
|
||||
{ name=cabal_darcs_name; p_deps = with ghc.core_libs; [base rts directory process pretty containers filepath];
|
||||
src = bleeding_edge_source "cabal";
|
||||
#fetchdarcs { url = "http://darcs.haskell.org/cabal"; md5 = "8b0bc3c7f2676ce642f98b1568794cd6"; };
|
||||
};
|
||||
cabal_darcs = { name=cabal_darcs_name; p_deps = with ghc.core_libs; [base rts directory process pretty containers filepath];
|
||||
src = fetchdarcs { url = "http://darcs.haskell.org/cabal"; md5 = "8b0bc3c7f2676ce642f98b1568794cd6"; };
|
||||
};
|
||||
};
|
||||
toDerivation = attrs : with attrs;
|
||||
# result is { mtl = <deriv>;
|
||||
addHasktagsTaggingInfo (ghcCabalDerivation {
|
||||
inherit (attrs) name src;
|
||||
annotatedGhcCabalDerivation ({
|
||||
inherit name src;
|
||||
propagatedBuildInputs = p_deps ++ (lib.optional (attrs.name != cabal_darcs_name) derivations.cabal_darcs );
|
||||
srcDir = if attrs ? srcDir then attrs.srcDir else ".";
|
||||
patches = if attrs ? patches then attrs.patches else [];
|
||||
# add cabal, take deps either from this list or from ghc.core_libs
|
||||
pass = if attrs ? pass then attrs.pass else {};
|
||||
});
|
||||
}//( lib.subsetmap lib.id attrs [ "patchPhase" ] )) null;
|
||||
derivations = with lib; builtins.listToAttrs (lib.concatLists ( lib.mapRecordFlatten
|
||||
( n : attrs : let d = (toDerivation attrs); in [ (nv n d) (nv attrs.name d) ] ) pkgs ) );
|
||||
}.derivations;
|
||||
|
@ -1473,14 +1415,14 @@ rec {
|
|||
ghcPackagedLibs = true;
|
||||
name = "ghc${ghc.version}_wrapper";
|
||||
suffix = "${ghc.version}wrapper";
|
||||
libraries = map ( a : __getAttr a (ghc68_extra_libs ghcsAndLibs.ghc68 ) ) [ "mtl" ]
|
||||
libraries = # map ( a : __getAttr a (ghc68_extra_libs ghcsAndLibs.ghc68 ) ) [ "mtl" ];
|
||||
# core_libs distributed with this ghc version
|
||||
#(lib.flattenAttrs ghcsAndLibs.ghc68.core_libs)
|
||||
#map ( a : __getAttr a ghcsAndLibs.ghc68.core_libs ) [
|
||||
# "cabal" "array" "base" "bytestring" "containers" "containers" "directory"
|
||||
# "filepath" "ghc-${ghc.version}" "haskell98" "hpc" "old_locale" "old_time"
|
||||
# "old_time" "packedstring" "pretty" "process" "random" "readline" "rts"
|
||||
# "template_haskell" "unix" "template_haskell" ];
|
||||
map ( a : __getAttr a ghcsAndLibs.ghc68.core_libs ) [
|
||||
"cabal" "array" "base" "bytestring" "containers" "containers" "directory"
|
||||
"filepath" "ghc-${ghc.version}" "haskell98" "hpc" "old_locale" "old_time"
|
||||
"old_time" "packedstring" "pretty" "process" "random" "readline" "rts"
|
||||
"template_haskell" "unix" "template_haskell" ]
|
||||
# some extra libs
|
||||
|
||||
++ (lib.flattenAttrs (ghc68_extra_libs ghcsAndLibs.ghc68) );
|
||||
|
@ -1854,17 +1796,6 @@ rec {
|
|||
};
|
||||
*/
|
||||
|
||||
bleeding_edge_repos = import ../development/misc/bleeding_edge_repos;
|
||||
# name must be foudn in bleeding_edge_repos attr set
|
||||
bleeding_edge_source = name : (
|
||||
let targz = nixRepositoryManager.repoDir+"/dist/${name}.tar.gz"; in
|
||||
if builtins.pathExists targz
|
||||
then targz
|
||||
else let attr = __getAttr name bleeding_edge_repos;
|
||||
in if (attr.type == "darcs")
|
||||
then fetchdarcs_2pre { inherit (attr) url md5; }
|
||||
else throw "TODO");
|
||||
|
||||
ecj = import ../development/eclipse/ecj {
|
||||
inherit fetchurl stdenv unzip jre ant;
|
||||
};
|
||||
|
@ -6006,12 +5937,6 @@ rec {
|
|||
db4 = db45;
|
||||
};
|
||||
|
||||
nixRepositoryManager = import ../tools/package-management/nixRepositoryManager {
|
||||
inherit fetchurl stdenv bleeding_edge_repos lib writeText;
|
||||
ghc = ghcsAndLibs.ghc68.ghc;
|
||||
fetchdarcs = fetchdarcs_2pre;
|
||||
};
|
||||
|
||||
nixStatic = import ../tools/package-management/nix-static {
|
||||
inherit fetchurl stdenv perl curl autoconf automake libtool;
|
||||
aterm = aterm242fixes;
|
||||
|
@ -6154,38 +6079,5 @@ rec {
|
|||
inherit (xlibs) libX11;
|
||||
};
|
||||
|
||||
# idea: provide environment so that you can use let nix assemble all dependencies
|
||||
# while keeping the same source base when developping
|
||||
# experimental
|
||||
my_environment = args: stdenv.mkDerivation (
|
||||
{ userCmds =""; } // {
|
||||
phases = "buildPhase";
|
||||
buildPhase = "
|
||||
ensureDir \$out/bin
|
||||
name=${args.name}
|
||||
o=\$out/bin/$name
|
||||
echo -e \"#!/bin/sh --login\\n\" >> \$o
|
||||
export | grep -v HOME= | grep -v PATH= >> \$o
|
||||
echo \"export PATH=\$PATH:\\\$PATH entering $name\" >> \$o
|
||||
echo \"echo entering $name\" >> \$o
|
||||
echo \"$userCmds\" >> \$o
|
||||
echo \"/bin/sh\" >> $o
|
||||
echo \"echo leaving $name\" >> \$o
|
||||
chmod +x $o
|
||||
";
|
||||
} //args);
|
||||
|
||||
# example for nix itself adding glibc tag file to an env var.
|
||||
# experimental
|
||||
env_nix = my_environment rec {
|
||||
buildInputs = [perl curl bzip2 aterm242fixes db4]
|
||||
++ map (x : sourceWithTagsDerivation ( (addCTaggingInfo x ).passthru.sourceWithTags ) ) [ glibc ];
|
||||
db4 = db44;
|
||||
aterm = aterm242fixes;
|
||||
name = "env_nix";
|
||||
userCmds = ". ~/.bashrc
|
||||
PS1='\033]2;\h:\u:\w\007\\nenv ${name} \[\033[1;32m\][\u@\h: \w ]$\[\033[0m\] '
|
||||
";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue