Live builds support: initially for git and svn. taglib_live is packaged as an example.
svn path=/nixpkgs/trunk/; revision=25351
This commit is contained in:
parent
8af7cabe21
commit
bbedfb4a5e
10
pkgs/build-support/fetchgitrevision/default.nix
Normal file
10
pkgs/build-support/fetchgitrevision/default.nix
Normal file
@ -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
|
||||
'');
|
10
pkgs/build-support/fetchsvnrevision/default.nix
Normal file
10
pkgs/build-support/fetchsvnrevision/default.nix
Normal file
@ -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
|
||||
'')
|
@ -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 ];
|
@ -263,6 +263,8 @@ let
|
||||
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 @@ let
|
||||
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 @@ let
|
||||
|
||||
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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user