2008-03-09 01:08:45 +01: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-03-06 03:46:29 +01:00
|
|
|
args: with args; with lib;
|
|
|
|
let
|
|
|
|
toConfigLine = name : set :
|
|
|
|
"[(\"name\",\"${name}\")," + ( concatStringsSep "," (map (a: "(\"${a}\",\"${__getAttr a set}\")" ) (__attrNames set)))+"]";
|
2008-03-09 01:08:45 +01:00
|
|
|
config = writeText "nix-repository-manager_config"
|
|
|
|
(bleedingEdgeRepos.managedRepoDir+"\n" +
|
|
|
|
concatStringsSep "\n" (mapRecordFlatten toConfigLine (bleedingEdgeRepos.repos)));
|
2008-03-06 03:46:29 +01:00
|
|
|
|
|
|
|
in
|
|
|
|
args.stdenv.mkDerivation {
|
|
|
|
|
2008-03-09 01:08:45 +01:00
|
|
|
name = "nix-repository-manager";
|
2008-03-06 03:46:29 +01:00
|
|
|
|
2008-03-09 01:08:45 +01:00
|
|
|
src = bleedingEdgeRepos.sourceByName "nix_repository_manager";
|
2008-03-06 03:46:29 +01:00
|
|
|
|
2008-03-09 01:08:45 +01:00
|
|
|
phases = "unpackPhase buildPhase";
|
2008-03-06 03:46:29 +01:00
|
|
|
|
|
|
|
buildPhase = "
|
2008-03-09 01:08:45 +01:00
|
|
|
s=\$out/share/nix-repository-manager
|
2008-03-06 03:46:29 +01:00
|
|
|
ensureDir \$out/bin \$s
|
2008-03-09 01:08:45 +01:00
|
|
|
#ghc --make nix-repository-manager.hs -o \$s/nix-repository-manager
|
|
|
|
ghc --make nix-repository-manager.hs -o \$s/nix-repository-manager
|
|
|
|
b=\$out/bin/nix-repository-manager
|
|
|
|
echo -e \"#!/bin/sh\\n\$s/nix-repository-manager --config ${config} \\\$@\" > \$b
|
2008-03-06 03:46:29 +01:00
|
|
|
chmod +x \$b
|
|
|
|
";
|
|
|
|
|
|
|
|
buildInputs = [ghc];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "makes it easy to keep some packages up to date";
|
2008-03-09 01:08:45 +01:00
|
|
|
homepage = http://mawercer.de/repos/nix-repository-manager;
|
|
|
|
license = "GPL";
|
2008-03-06 03:46:29 +01:00
|
|
|
};
|
2008-08-06 18:56:05 +02:00
|
|
|
dummy=1;
|
2008-03-06 03:46:29 +01:00
|
|
|
}
|