mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
Updating XMoto (and adding some functionality to upstream tracking system)
svn path=/nixpkgs/trunk/; revision=17100
This commit is contained in:
parent
00343dac28
commit
125600079d
@ -4,3 +4,8 @@
|
||||
#http://downloads.sourceforge.net/webdruid/files/webdruid/0.6.0-alpha5/webdruid-0.6.0-alpha5.tar.gz
|
||||
skipRedirectSF='s@^http://sourceforge.net/projects/@http://downloads.sourceforge.net/@; s@/download$@@'
|
||||
extractReleaseSF='s@.*/([^/]+)/[^/]+@\1@'
|
||||
|
||||
replaceAllVersionOccurences() {
|
||||
echo s/"$version"/\${version}/g
|
||||
}
|
||||
dashDelimitedVersion='s/.*-([0-9.]+)-.*/\1/'
|
||||
|
@ -37,7 +37,7 @@ prefetchClause=""
|
||||
eval "egrep \"$(getAttr sourceRegexp '.*[.]tar[.].*')\"" |
|
||||
eval "$(getAttr choiceCommand 'head -1')")"
|
||||
|
||||
if ! egrep ':' freshUrl ; then
|
||||
if ! egrep ':' <<< "$freshUrl" ; then
|
||||
freshUrl="$(dirname "$(getAttr downloadPage).")/$freshUrl"
|
||||
fi
|
||||
|
||||
@ -54,6 +54,7 @@ prefetchClause=""
|
||||
eval "sed -r -e \"$(getAttr versionReferenceCreator \
|
||||
's/-([0-9.]+)[.]/-${version}./')\"" |
|
||||
eval "sed -r -e \"$(getAttr mirrorSedScript)\"")"
|
||||
url="$mirrorUrl"
|
||||
|
||||
name="$baseName-$version"
|
||||
|
||||
|
@ -1,29 +1,28 @@
|
||||
args :
|
||||
a :
|
||||
let
|
||||
lib = args.lib;
|
||||
fetchurl = args.fetchurl;
|
||||
|
||||
version = lib.attrByPath ["version"] "0.5.1" args;
|
||||
buildInputs = with args; [
|
||||
s = import ./src-for-default.nix;
|
||||
buildInputs = with a; [
|
||||
chipmunk sqlite curl zlib bzip2 libjpeg libpng
|
||||
freeglut mesa SDL SDL_mixer SDL_image SDL_net SDL_ttf
|
||||
lua5 ode
|
||||
];
|
||||
in
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = "http://download.tuxfamily.org/xmoto/xmoto/${version}/xmoto-${version}-src.tar.gz";
|
||||
sha256 = "1clfw4kr34gda9ml427n8mdkhj0hhlldibiq1ay88glqqwvgj2j2";
|
||||
};
|
||||
src = a.fetchUrlFromSrcInfo s;
|
||||
|
||||
inherit (s) name;
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["doConfigure" "doMakeInstall"];
|
||||
|
||||
name = "xmoto-" + version;
|
||||
meta = {
|
||||
description = "X-Moto - obstacled race game";
|
||||
maintainers = [
|
||||
a.lib.maintainers.raskin
|
||||
];
|
||||
platforms = with a.lib.platforms;
|
||||
linux ++ freebsd;
|
||||
};
|
||||
}
|
||||
|
9
pkgs/games/xmoto/src-for-default.nix
Normal file
9
pkgs/games/xmoto/src-for-default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
rec {
|
||||
version="0.5.2";
|
||||
name="xmoto-0.5.2";
|
||||
hash="13q5b0a1ha5am3p2b7a399ca7vnw4fs82y96aw0n96s3xmw17jd8";
|
||||
url="http://download.tuxfamily.org/xmoto/xmoto/${version}/xmoto-${version}-src.tar.gz";
|
||||
advertisedUrl="http://download.tuxfamily.org/xmoto/xmoto/0.5.2/xmoto-0.5.2-src.tar.gz";
|
||||
|
||||
|
||||
}
|
7
pkgs/games/xmoto/src-info-for-default.nix
Normal file
7
pkgs/games/xmoto/src-info-for-default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
downloadPage = "http://xmoto.tuxfamily.org/";
|
||||
baseName = "xmoto";
|
||||
sourceRegexp = "xmoto-.*-src[.]tar[.].*";
|
||||
versionExtractorSedScript = ''$dashDelimitedVersion'';
|
||||
versionReferenceCreator=''$(replaceAllVersionOccurences)'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user