[Nix-dev] hgsubversion (and subvertpy) nix-expressions

Ilya Cassina ilya.cassina at gmail.com
Thu Oct 14 00:12:31 CEST 2010


especially dedicated to viric :)

imc
-------------- next part --------------
{stdenv, fetchurl, python, subversion, apr, aprutil}:

python.stdenv.mkDerivation {
    name = "subvertpy-0.7.4";
    src = fetchurl {
        url = http://launchpadlibrarian.net/56729076/subvertpy-0.7.4.tar.gz;
        sha256 = "94cfaf50edf47bfc79698a08dac10655be97e938f55ef656cea04cd174606ab4";
    };
    buildInputs = [python subversion apr aprutil];


    buildPhase = ''
        export SVN_PREFIX=${subversion}
        python setup.py build
    '';

    installPhase = ''
        version=`python --version 2>&1 | awk '{print $2}' | cut -d . -f 1,2`
        ensureDir $out/lib/python$version/site-packages/
        echo "cp -r build/lib.*-$version/subvertpy $out/lib/python$version/site-packages/"
        cp -r build/lib.*-$version/subvertpy $out/lib/python$version/site-packages/

        ensureDir $out/bin
        cp -r build/scripts-$version/subvertpy-fast-export $out/bin
    '';

}
-------------- next part --------------
{ stdenv, fetchurl, python27, mercurial, subvertpy}:

let
  version = "1.1.2+101-bfb88a304ebe+20101012";
  sha256 = "761c13b572ad380c1e33f6e5c7bc4f80cced07e9467ebceafb231492c59a9ea4";
in

stdenv.mkDerivation {
  name = "hgsubversion-" + version;

  # No tarball yet.
  src = fetchurl {
    url = http://bitbucket.org/durin42/hgsubversion/get/bfb88a304ebe.bz2;
    inherit sha256;
  };

  buildInputs = [ python27 mercurial subvertpy ];

  unpackPhase = ''
    tar xvjf $src
  '';

  buildPhase = ''
    cd hgsubversion
    python2.7 setup.py build
  '';

  installPhase = ''
    python2.7 setup.py install --prefix="$out"
  '';
}


More information about the nix-dev mailing list