Author: urkud
Date: Tue Oct 4 11:12:17 2011
New Revision: 29623
URL: https://ssl.nixos.org/websvn/nix/?rev=29623&sc=1
Log:
liblastfm: fix compilation with ruby-1.9.x
Added:
nixpkgs/trunk/pkgs/development/libraries/liblastfm/ruby-1.9.patch
Modified:
nixpkgs/trunk/pkgs/development/libraries/liblastfm/default.nix
Modified: nixpkgs/trunk/pkgs/development/libraries/liblastfm/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/liblastfm/default.nix Tue Oct
4 11:12:11 2011 (r29622)
+++ nixpkgs/trunk/pkgs/development/libraries/liblastfm/default.nix Tue Oct
4 11:12:17 2011 (r29623)
@@ -1,18 +1,25 @@
{ stdenv, fetchurl, ruby, qt4, pkgconfig, libsamplerate, fftwSinglePrec }:
+let version = "0.3.3"; in
+
stdenv.mkDerivation rec {
- name = "liblastfm-0.3.0";
+ name = "liblastfm-${version}";
+ # Upstream does not package git tags as tarballs. Get tarball from github.
src = fetchurl {
- url = "http://cdn.last.fm/src/${name}.tar.bz2";
- sha256 = "0vgpkbqmynm975nlcw3caxpz30wvvz35c7a9kfr2wjqizvxrfwnx";
+ url = "https://github.com/mxcl/liblastfm/tarball/${version}";
+ name = "${name}.tar.gz";
+ sha256 = "0v33vzj89mgx2pc5fmiywlz51i553ckydw9xz70fiflm2inbl1r6";
};
prefixKey = "--prefix ";
propagatedBuildInputs = [ qt4 libsamplerate fftwSinglePrec ];
- buildInputs = [ ruby pkgconfig ];
+ buildNativeInputs = [ ruby pkgconfig ];
+
+ configureFlags = "--release";
- patchPhase = "patchShebangs .";
+ patches = [ ./ruby-1.9.patch ];
+ postPatch = "patchShebangs .";
meta = {
homepage = http://github.com/mxcl/liblastfm;
Added: nixpkgs/trunk/pkgs/development/libraries/liblastfm/ruby-1.9.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/libraries/liblastfm/ruby-1.9.patch Tue Oct
4 11:12:17 2011 (r29623)
@@ -0,0 +1,45 @@
+From: Yury G. Kudryashov <[email protected]>
+Subject: [PATCH] Fix compilation with ruby-1.9
+
+__FILE__ is a relative path in ruby-1.9
+
+---
+ admin/Makefile.rb | 4 ++--
+ admin/qpp | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/admin/Makefile.rb b/admin/Makefile.rb
+index 592f5a5..33fe688 100755
+--- a/admin/Makefile.rb
++++ b/admin/Makefile.rb
+@@ -6,7 +6,7 @@
+
+ cwd = File.dirname( __FILE__ )
+ require 'find'
+-require "#{cwd}/platform.rb"
++require_relative 'platform'
+
+
+ ######################################################################### defs
+@@ -158,4 +158,4 @@ puts <<-EOS
+ .PHONY: dist
+ dist:
+ git archive --prefix=#{BASENAME}/ HEAD | bzip2 > #{BASENAME}.tar.bz2
+-EOS
+\ No newline at end of file
++EOS
+diff --git a/admin/qpp b/admin/qpp
+index 36b2d05..ee840fd 100755
+--- a/admin/qpp
++++ b/admin/qpp
+@@ -4,7 +4,7 @@
+
+ cwd=File.dirname __FILE__
+ require 'find'
+-require "#{cwd}/findsrc"
++require_relative 'findsrc'
+
+ sources = Array.new
+ headers = Array.new
+--
+tg: (f0b3239..) t/ruby19 (depends on: master)
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits