On Thursday 14 October 2010 11:55:34 Lluís Batlle i Rossell wrote:
> On Thu, Oct 14, 2010 at 10:39:41AM +0200, Ilya Cassina wrote:
> > On Thursday 14 October 2010 08:53:16 Lluís Batlle i Rossell wrote:
> > > Look at top-level/python-packages.nix. I think the buildPythonPackage
> > > expresion may do all the work you are doing here.
> > 
> > I will and send back the changes (and add metadata this time!).
> 
> Add the packages in the python-packages.nix file, if you can. Don't make
> nix files apart.

hgsubversion didn't exactly work as a python package, i've put it in 
applications/version-control/mercurial/hgsubversion.nix

subvertpy was effortless :P

here the patch against nixpkgs/trunk r24289, enjoy! (today i'll write a 
nixpkgs/nixos mercurial wiki page (as i've spent all yesterday tracking down 
a nasty bug/mistake that's better to avoid))


saluti

imc
diff -r ed2b544c98de pkgs/applications/version-management/mercurial/hgsubversion.nix
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgs/applications/version-management/mercurial/hgsubversion.nix	Thu Oct 14 16:25:24 2010 +0200
@@ -0,0 +1,35 @@
+{stdenv, fetchurl, python, mercurial, subvertpy}:
+
+stdenv.mkDerivation {
+    name = "hgsubversion-" + "1.1.2+101-bfb88a304ebe+20101012";
+
+    src = fetchurl {
+      url = http://bitbucket.org/durin42/hgsubversion/get/bfb88a304ebe.bz2;
+      sha256 = "761c13b572ad380c1e33f6e5c7bc4f80cced07e9467ebceafb231492c59a9ea4";
+    };
+
+    meta = {
+        description = "subversion module for mercurial, allows transparent svn interaction";
+        homepage = http://bitbucket.org/durin42/hgsubversion/wiki/Home;
+        license = "GPLv2";
+    };
+
+    propagatedBuildInputs = [ python mercurial subvertpy ];
+
+    phases = "unpackPhase buildPhase installPhase";
+
+    unpackPhase = ''
+        tar xvjf $src
+        cd hgsubversion
+    '';
+
+    buildPhase = ''
+        python setup.py build
+    '';
+
+    installPhase = ''
+        ensureDir $out/lib/${python.libPrefix}/
+        cp -r build/lib/hgsubversion $out/lib/${python.libPrefix}/
+    '';
+
+}
diff -r ed2b544c98de pkgs/top-level/all-packages.nix
--- a/pkgs/top-level/all-packages.nix	Wed Oct 13 21:58:09 2010 +0200
+++ b/pkgs/top-level/all-packages.nix	Thu Oct 14 16:25:24 2010 +0200
@@ -735,6 +735,10 @@
 
   hevea = callPackage ../tools/typesetting/hevea { };
 
+  hgsubversion = callPackage ../applications/version-management/mercurial/hgsubversion.nix {
+    subvertpy = pythonPackages.subvertpy;
+  };
+
   highlight = callPackage ../tools/text/highlight { };
 
   host = callPackage ../tools/networking/host { };
diff -r ed2b544c98de pkgs/top-level/python-packages.nix
--- a/pkgs/top-level/python-packages.nix	Wed Oct 13 21:58:09 2010 +0200
+++ b/pkgs/top-level/python-packages.nix	Thu Oct 14 16:25:24 2010 +0200
@@ -903,6 +903,28 @@
     };
   });
 
+  subvertpy = buildPythonPackage {
+    name = "subvertpy-0.7.4";
+    src = fetchurl {
+        url = http://launchpadlibrarian.net/56729076/subvertpy-0.7.4.tar.gz;
+        sha256 = "94cfaf50edf47bfc79698a08dac10655be97e938f55ef656cea04cd174606ab4";
+    };
+
+    meta = {
+        description = "Python bindings for subversion";
+        homepage = http://samba.org/~jelmer/subvertpy/;
+        license = "GPLv2";
+    };
+
+    buildInputs = [pkgs.subversion pkgs.apr pkgs.aprutil];
+
+    phases = "unpackPhase preConfigure buildPhase installPhase";
+
+    preConfigure = ''
+        export SVN_PREFIX="${pkgs.subversion}"
+    '';
+  };
+
   trac = buildPythonPackage {
     name = "trac-0.11.5";
 
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to