2008-03-09 01:08:45 +01:00
|
|
|
args:
|
|
|
|
with args;
|
|
|
|
let inherit (builtins) pathExists; in
|
|
|
|
rec {
|
|
|
|
/*
|
|
|
|
tries to get source in this order
|
|
|
|
1) Local .tar.gz in ${HOME}/managed_repos/dist/name.tar.gz (-> see nixRepositoryManager)
|
|
|
|
2) By importing
|
|
|
|
pkgs/misc/bleeding-edge-fetch-info/name.nix
|
|
|
|
(generated by nixRepositoryManager --publish)
|
|
|
|
3) Fall back to fetch_xy given with information given by A) But
|
|
|
|
the sum wil propably be wrong..
|
|
|
|
(not everything is implemented now)
|
|
|
|
*/
|
2008-03-06 03:46:29 +01:00
|
|
|
|
2008-03-09 01:08:45 +01:00
|
|
|
managedRepoDir = getConfig [ "bleedingEdgeRepos" "managedRepoDir" ] (builtins.getEnv "HOME" + "/managed_repos");
|
|
|
|
|
|
|
|
sourceByName = name : (
|
|
|
|
let localTarGZ = managedRepoDir+"/dist/${name}.tar.gz";
|
|
|
|
fetchUrlInfoFile = ../../../misc/bleeding-edge-fetch-info + "/${name}.nix"; in
|
|
|
|
if pathExists localTarGZ
|
|
|
|
then localTarGZ
|
|
|
|
else if pathExists fetchUrlInfoFile
|
|
|
|
then (import fetchUrlInfoFile) { inherit fetchurl; }
|
|
|
|
else builtins.trace "warning, no bleeding edge source info (${fetchUrlInfoFile}) found for ${name}, hash will propably be wrong"
|
|
|
|
(let attr = __getAttr name repos;
|
|
|
|
in if (attr.type == "darcs")
|
|
|
|
then fetchdarcs_2pre { inherit (attr) url md5; }
|
|
|
|
else throw "TODO") );
|
|
|
|
|
|
|
|
repos = {
|
|
|
|
# each repository has
|
|
|
|
# a type, url and maybe a tag
|
|
|
|
# you can add groups names to update some repositories at once
|
|
|
|
# see nix_repository_manager expression in all-packages.nix
|
|
|
|
|
|
|
|
nix_repository_manager = { type = "darcs"; url = "http://mawercer.de/~marc/repos/nix-repository-manager"; };
|
|
|
|
|
|
|
|
# darcs repositories haskell
|
|
|
|
http = { type= "darcs"; url="http://darcs.haskell.org/http/"; groups="happs"; };
|
|
|
|
syb_with_class = { type="darcs"; url="http://happs.org/HAppS/syb-with-class"; groups="happs"; };
|
|
|
|
happs_data = { type="darcs"; url=http://happs.org/repos/HAppS-Data; groups="happs"; };
|
|
|
|
happs_util = { type="darcs"; url=http://happs.org/repos/HAppS-Util; groups="happs"; };
|
|
|
|
happs_state = { type="darcs"; url=http://happs.org/repos/HAppS-State; groups="happs"; };
|
|
|
|
happs_plugins = { type="darcs"; url=http://happs.org/repos/HAppS-Plugins; groups="happs"; };
|
|
|
|
happs_ixset = { type="darcs"; url=http://happs.org/repos/HAppS-IxSet; groups="happs"; };
|
|
|
|
happs_server = { type="darcs"; url=http://happs.org/repos/HAppS-HTTP; groups="happs"; };
|
2008-03-13 23:55:18 +01:00
|
|
|
takusen = { type="darcs"; url=http://darcs.haskell.org/takusen/; };
|
|
|
|
cabal = { type="darcs"; url=http://darcs.haskell.org/cabal; };
|
|
|
|
|
2008-03-09 01:08:45 +01:00
|
|
|
|
|
|
|
# git repositories
|
|
|
|
hypertable = { type="git"; url="git://scm.hypertable.org/pub/repos/hypertable.git"; groups=""; };
|
|
|
|
} // getConfig [ "bleedingEdgeRepos" "repos" ] {};
|
2008-03-06 03:46:29 +01:00
|
|
|
}
|