Author: egorochkin
Date: Sun Jan 2 23:23:59 2011
New Revision: 25351
URL: https://svn.nixos.org/websvn/nix/?rev=25351&sc=1
Log:
Live builds support: initially for git and svn. taglib_live is packaged as an
example.
Added:
nixpkgs/trunk/pkgs/build-support/fetchgitrevision/
nixpkgs/trunk/pkgs/build-support/fetchgitrevision/default.nix
nixpkgs/trunk/pkgs/build-support/fetchsvnrevision/
nixpkgs/trunk/pkgs/build-support/fetchsvnrevision/default.nix
nixpkgs/trunk/pkgs/development/libraries/taglib/live.nix
- copied, changed from r25348,
nixpkgs/trunk/pkgs/development/libraries/taglib/1.7.nix
Deleted:
nixpkgs/trunk/pkgs/development/libraries/taglib/1.7.nix
Modified:
nixpkgs/trunk/pkgs/top-level/all-packages.nix
Added: nixpkgs/trunk/pkgs/build-support/fetchgitrevision/default.nix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/build-support/fetchgitrevision/default.nix Sun Jan
2 23:23:59 2011 (r25351)
@@ -0,0 +1,10 @@
+runCommand: git: repository: branch:
+ import (runCommand "head-revision"
+ { buildInputs = [ git ];
+ dummy = builtins.currentTime;
+ }
+ ''
+ rev=$(git ls-remote ${repository} | grep "refs/${branch}$" | awk '{
print $1 }')
+ echo "[ \"$rev\" ]" > $out
+ echo Latest revision in ${branch} is $rev
+ '');
Added: nixpkgs/trunk/pkgs/build-support/fetchsvnrevision/default.nix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/build-support/fetchsvnrevision/default.nix Sun Jan
2 23:23:59 2011 (r25351)
@@ -0,0 +1,10 @@
+runCommand: subversion: repository:
+ import (runCommand "head-revision"
+ { buildInputs = [ subversion ];
+ dummy = builtins.currentTime;
+ }
+ ''
+ rev=$(echo p | svn ls -v --depth empty ${repository} |awk '{ print $1
}')
+ echo "[ \"$rev\" ]" > $out
+ echo Latest revision is $rev
+ '')
\ No newline at end of file
Copied and modified: nixpkgs/trunk/pkgs/development/libraries/taglib/live.nix
(from r25348, nixpkgs/trunk/pkgs/development/libraries/taglib/1.7.nix)
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/taglib/1.7.nix Sun Jan 2
20:09:25 2011 (r25348, copy source)
+++ nixpkgs/trunk/pkgs/development/libraries/taglib/live.nix Sun Jan 2
23:23:59 2011 (r25351)
@@ -1,13 +1,17 @@
-{stdenv, fetchsvn, zlib, cmake}:
+{stdenv, fetchsvn, fetchsvnrevision, zlib, cmake
+, repository ? "svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib"
+, rev ? fetchsvnrevision repository
+, src ? fetchsvn {
+ url = repository;
+ rev = rev;
+ }
+}:
stdenv.mkDerivation {
- name = "taglib-1.7a";
-
- src = fetchsvn {
- url = svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib;
- rev = 1145554;
- };
-
+ name = "taglib-live";
+
+ inherit src;
+
cmakeFlags = [ "-DWITH-ASF=ON" "-DWITH-MP4=ON" ];
buildInputs = [ zlib cmake ];
Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix Sun Jan 2 22:35:02
2011 (r25350)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix Sun Jan 2 23:23:59
2011 (r25351)
@@ -263,6 +263,8 @@
inherit stdenv git;
};
+ fetchgitrevision = import ../build-support/fetchgitrevision runCommand git;
+
fetchmtn = import ../build-support/fetchmtn {
inherit monotone stdenv;
cacheDB = getConfig ["fetchmtn" "cacheDB"] "";
@@ -273,6 +275,8 @@
inherit stdenv subversion openssh;
sshSupport = true;
};
+
+ fetchsvnrevision = import ../build-support/fetchsvnrevision runCommand
subversion;
fetchsvnssh = import ../build-support/fetchsvnssh {
inherit stdenv subversion openssh expect;
@@ -4036,7 +4040,7 @@
taglib = callPackage ../development/libraries/taglib { };
- taglib17 = callPackage ../development/libraries/taglib/1.7.nix { };
+ taglib_live = callPackage ../development/libraries/taglib/live.nix { };
taglib_extras = callPackage ../development/libraries/taglib-extras { };
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits