about summary refs log tree commit diff
path: root/pkgs/development/misc
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2008-10-14 14:01:00 +0000
committerMarc Weber <marco-oweber@gmx.de>2008-10-14 14:01:00 +0000
commit892db3bb8c23305b66e24e2b600b03ae197aa0c3 (patch)
treea89edcd4903f1c1c3429f20119d030de55b357bd /pkgs/development/misc
parent3f0a8494c98071720dc4b9beae6cd8bf3aeb5424 (diff)
downloadnixlib-892db3bb8c23305b66e24e2b600b03ae197aa0c3.tar
nixlib-892db3bb8c23305b66e24e2b600b03ae197aa0c3.tar.gz
nixlib-892db3bb8c23305b66e24e2b600b03ae197aa0c3.tar.bz2
nixlib-892db3bb8c23305b66e24e2b600b03ae197aa0c3.tar.lz
nixlib-892db3bb8c23305b66e24e2b600b03ae197aa0c3.tar.xz
nixlib-892db3bb8c23305b66e24e2b600b03ae197aa0c3.tar.zst
nixlib-892db3bb8c23305b66e24e2b600b03ae197aa0c3.zip
update bleeding edge repo management
it now figures out the dist name from the url and the revision is added to the url
This way a new version doesn't override the old one and you can keep multiple dist tar.gz files

svn path=/nixpkgs/trunk/; revision=13065
Diffstat (limited to 'pkgs/development/misc')
-rw-r--r--pkgs/development/misc/bleeding-edge-repos/default.nix17
1 files changed, 10 insertions, 7 deletions
diff --git a/pkgs/development/misc/bleeding-edge-repos/default.nix b/pkgs/development/misc/bleeding-edge-repos/default.nix
index 8ed2c80bacc4..9635e0b2aeb5 100644
--- a/pkgs/development/misc/bleeding-edge-repos/default.nix
+++ b/pkgs/development/misc/bleeding-edge-repos/default.nix
@@ -1,6 +1,6 @@
 args: 
   with args;
-  let inherit (builtins) pathExists; in
+  let inherit (builtins) pathExists hasAttr getAttr head; in
   rec {
   /*
     tries to get source in this order
@@ -13,13 +13,14 @@ args:
   managedRepoDir = getConfig [ "bleedingEdgeRepos" "managedRepoDir" ] (builtins.getEnv "HOME" + "/managed_repos");
 
   sourceByName = name :
-    let localTarGZ = managedRepoDir+"/dist/${name}.tar.gz"; 
+    let fetchinfo = if (hasAttr name fetchInfos) 
+          then (getAttr name fetchInfos) { inherit fetchurl; }
+          else throw "no bleeding edge source attribute found in bleeding-edge-fetch-infos.nix with name ${name}\n"
+                     "run NO_FETCH=1 nix-repository-manager <path to nixpkgs> --update <reponame> to add it automatically";
+        localTarGZ = managedRepoDir+"/dist/${ lib.dropPath (head fetchinfo.urls) }"; # hack, dropPath should be implemented as primop
         fetchInfos = import ../../../misc/bleeding-edge-fetch-infos.nix; in
-    if (getConfig ["bleedingEdgeRepos" "useLocalRepos"] false ) && pathExists localTarGZ
-    then localTarGZ
-    else if __hasAttr name fetchInfos
-         then (__getAttr name fetchInfos) { inherit fetchurl; }
-         else throw "warning, no bleeding edge source attribute found in bleeding-edge-fetch-infos.nix with name ${name}";
+    if (getConfig ["bleedingEdgeRepos" "useLocalRepos"] false )
+        then localTarGZ else fetchinfo;
 
   repos = 
       let kde4support = builtins.listToAttrs (map (n: lib.nv ("kdesupport_"+n) { type = "svn"; url = "svn://anonsvn.kde.org/home/kde/trunk/kdesupport/${n}"; groups="kdesupport"; })
@@ -64,6 +65,8 @@ args:
       kdepimlibs = { type="svn"; url="svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs"; groups = "kde"; };
       kdebase = { type="svn"; url="svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase"; groups = "kde"; };
 
+      cinelerra =  { type="git"; url="git://git.cinelerra.org/j6t/cinelerra.git"; };
+
       # git repositories 
       hypertable =  { type="git"; url="git://scm.hypertable.org/pub/repos/hypertable.git"; groups=""; };
     } // kde4support // getConfig [ "bleedingEdgeRepos" "repos" ] {};