2008-03-09 00:08:45 +00:00
|
|
|
/*
|
|
|
|
repos for config file taken from all-pacakges.bleedingEdgeFetchInfo
|
|
|
|
|
|
|
|
nix-repository-manager --update <name> (for your local use only)
|
|
|
|
|
|
|
|
if you want to publish repos ask for the password (marco-oweber@gmx.de)
|
|
|
|
echo '{ bleedingEdgeFetchInfo = "${your_nix_pkgs_location}/pkgs/misc/bleeding-edge-fetch-info"; }' >> .nixpkgs/config.nix
|
|
|
|
reinstall nix-repository-manager to recreate config
|
|
|
|
nix-repository-manager --publish <name> (to save on server
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2008-08-19 12:36:00 +00:00
|
|
|
args: with args; with args.lib;
|
2008-03-06 02:46:29 +00:00
|
|
|
let
|
|
|
|
toConfigLine = name : set :
|
|
|
|
"[(\"name\",\"${name}\")," + ( concatStringsSep "," (map (a: "(\"${a}\",\"${__getAttr a set}\")" ) (__attrNames set)))+"]";
|
2008-08-19 12:36:00 +00:00
|
|
|
config = pkgs.writeText "nix-repository-manager_config"
|
2008-03-09 00:08:45 +00:00
|
|
|
(bleedingEdgeRepos.managedRepoDir+"\n" +
|
|
|
|
concatStringsSep "\n" (mapRecordFlatten toConfigLine (bleedingEdgeRepos.repos)));
|
2008-03-06 02:46:29 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
|
2008-08-19 12:36:00 +00:00
|
|
|
{
|
2008-03-09 00:08:45 +00:00
|
|
|
name = "nix-repository-manager";
|
2008-03-06 02:46:29 +00:00
|
|
|
|
2008-08-19 12:36:00 +00:00
|
|
|
libsFun = x : [x.base x.time x.old_locale x.mtl];
|
2008-03-06 02:46:29 +00:00
|
|
|
|
2008-08-19 12:36:00 +00:00
|
|
|
src = bleedingEdgeRepos.sourceByName "nix_repository_manager";
|
2008-03-06 02:46:29 +00:00
|
|
|
|
2008-08-19 12:36:00 +00:00
|
|
|
pass = {
|
|
|
|
buildPhase = ''
|
2008-08-19 13:31:52 +00:00
|
|
|
cp ${pkgs.getConfig ["nixRepositoryManager" "sourcefile"] "nix-repository-manager.hs"} source.hs
|
2008-08-19 12:36:00 +00:00
|
|
|
s=$out/share/nix-repository-manager
|
|
|
|
ensureDir $out/bin $s
|
2008-08-19 13:31:52 +00:00
|
|
|
ghc --make source.hs -o $s/nix-repository-manager
|
2008-08-19 12:36:00 +00:00
|
|
|
b=$out/bin/nix-repository-manager
|
|
|
|
echo -e "#!/bin/sh\n$s/nix-repository-manager ${config} \$@" > $b
|
|
|
|
chmod +x $b
|
|
|
|
'';
|
|
|
|
};
|
2008-03-06 02:46:29 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "makes it easy to keep some packages up to date";
|
2008-03-09 00:08:45 +00:00
|
|
|
homepage = http://mawercer.de/repos/nix-repository-manager;
|
|
|
|
license = "GPL";
|
2008-03-06 02:46:29 +00:00
|
|
|
};
|
|
|
|
}
|