From 756ff550afca87a985bbff7bac618af1f13f7fb5 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Mon, 28 Jan 2008 19:48:21 +0000 Subject: [PATCH] Added old flac (as an option): kde4 needs it svn path=/nixpkgs/trunk/; revision=10355 --- pkgs/applications/audio/flac/default.nix | 27 ++++++++++++++---------- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index e61fd05ce389..b1636855aae9 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -1,11 +1,16 @@ -{stdenv, fetchurl, libogg}: - -stdenv.mkDerivation { - name = "flac-1.2.1"; - src = fetchurl { - url = http://downloads.xiph.org/releases/flac/flac-1.2.1.tar.gz; - sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn"; - }; - - buildInputs = [libogg] ; -} +args: with args; +let + flacFun = version: hash: + stdenv.mkDerivation rec { + name = "flac-${version}"; + src = fetchurl ({ + url = "http://downloads.xiph.org/releases/flac/${name}.tar.gz"; + } // hash); + buildInputs = [libogg]; + }; +in +stdenv.lib.listOfListsToAttrs [ + [ "default" (flacFun "1.2.1" { sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn"; }) ] + [ "1.2.1" (flacFun "1.2.1" { sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn"; }) ] + [ "1.1.2" (flacFun "1.1.2" { md5 = "2bfc127cdda02834d0491ab531a20960"; }) ] +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eb505a5d979f..00df7c50d78b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4263,10 +4263,12 @@ rec { firefox3b1Wrapper = lowPrio (wrapFirefox firefox3b1 ""); firefox3b1BinWrapper = lowPrio (wrapFirefox firefox3b1Bin ""); - flac = import ../applications/audio/flac { + flacAlts = import ../applications/audio/flac { inherit fetchurl stdenv libogg; }; + flac = getVersion "flac" flacAlts; + flashplayer = flashplayer9; flashplayer7 = import ../applications/networking/browsers/mozilla-plugins/flashplayer-7 {