From 1215f3a7a439616a5202e4750e4840a33e4d4341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Fri, 30 Apr 2010 21:58:47 +0000 Subject: [PATCH] Adding yasm, and making x264 and xvid codecs be compiled with their assembly code svn path=/nixpkgs/trunk/; revision=21470 --- pkgs/development/compilers/yasm/default.nix | 16 ++++++++++++++++ pkgs/development/libraries/x264/default.nix | 6 ++++-- pkgs/development/libraries/xvidcore/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 7 +++++-- 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/compilers/yasm/default.nix diff --git a/pkgs/development/compilers/yasm/default.nix b/pkgs/development/compilers/yasm/default.nix new file mode 100644 index 000000000000..c0da59515174 --- /dev/null +++ b/pkgs/development/compilers/yasm/default.nix @@ -0,0 +1,16 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "yasm-2.05.01"; + + src = fetchurl { + url = http://www.tortall.net/projects/yasm/releases/yasm-1.0.0.tar.gz; + sha256 = "0nd95r9y5r3p9mvdyj1yhvlz9zjw0id1g470c7i1p3p0x0n6zc06"; + }; + + meta = { + homepage = http://www.tortall.net/projects/yasm/; + description = "Complete rewrite of the NASM assembler"; + license = "BSD"; + }; +} diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index e6fbb6d5cc58..6928f9f6df4b 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{stdenv, fetchurl, yasm}: stdenv.mkDerivation rec { version = "snapshot-20100429-2245"; @@ -13,7 +13,9 @@ stdenv.mkDerivation rec { sed -i s,/bin/bash,${stdenv.shell}, configure version.sh ''; - configureFlags = [ "--disable-asm" "--enable-shared" ]; + configureFlags = [ "--enable-shared" ]; + + buildInputs = [ yasm ]; meta = { description = "library for encoding H264/AVC video streams"; diff --git a/pkgs/development/libraries/xvidcore/default.nix b/pkgs/development/libraries/xvidcore/default.nix index b02ae2b14e9b..7276402cbf5d 100644 --- a/pkgs/development/libraries/xvidcore/default.nix +++ b/pkgs/development/libraries/xvidcore/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, nasm}: stdenv.mkDerivation rec { name = "xvidcore-1.2.2"; @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { preConfigure = '' cd build/generic ''; + + buildInputs = [ nasm ]; meta = { description = "MPEG-4 video codec for PC"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fa0f47f370c1..1b16caf967ef 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2604,6 +2604,9 @@ let inherit fetchurl stdenv; }; + yasm = import ../development/compilers/yasm { + inherit fetchurl stdenv; + }; ### DEVELOPMENT / INTERPRETERS @@ -5202,7 +5205,7 @@ let }; x264 = import ../development/libraries/x264 { - inherit fetchurl stdenv; + inherit fetchurl stdenv yasm; }; xapian = makeOverridable (import ../development/libraries/xapian) { @@ -5248,7 +5251,7 @@ let }; xvidcore = import ../development/libraries/xvidcore { - inherit fetchurl stdenv; + inherit fetchurl stdenv nasm; }; zangband = builderDefsPackage (import ../games/zangband) {