diff options
author | Profpatsch <mail@profpatsch.de> | 2017-06-14 11:29:31 +0200 |
---|---|---|
committer | Joachim Schiele <js@lastlog.de> | 2017-06-14 11:29:31 +0200 |
commit | 79dd4deda5a5ee44359a88cdcbbc22a15ba26224 (patch) | |
tree | 270e42ec5d33fa623f92e352fe9025d14e269bca /pkgs/development/libraries/audio | |
parent | f6fbbabcb70a19428a7adde2e4f1ec477c439654 (diff) |
Ultrastar (#26524)
* ultrastardx-beta: init at 1.3.5
* libbass, libbass_fx: init at 24
* ultrastar-creator: init at 2017-04-12
* buildSupport/plugins.nix: add diffPlugins
Helper function to compare expected plugin lists to the found plugins.
* ultrastar-manager: init at 2017-05-24
The plugins are built in their own derivations, speeding up (re-)compilation.
The `diffPlugins` function from `beets` is reused to test for changes in the
plugin list on updates.
* beets: switch to diffPlugins
The function is basically just extracted for better reusability.
Diffstat (limited to 'pkgs/development/libraries/audio')
-rw-r--r-- | pkgs/development/libraries/audio/libbass/default.nix | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/development/libraries/audio/libbass/default.nix b/pkgs/development/libraries/audio/libbass/default.nix new file mode 100644 index 000000000000..dedfa5ceb352 --- /dev/null +++ b/pkgs/development/libraries/audio/libbass/default.nix @@ -0,0 +1,59 @@ +{ stdenv, unzip, fetchurl, writeText }: + +let + version = "24"; + + allBass = { + bass = { + h = "bass.h"; + so = { + i686_linux = "libbass.so"; + x86_64-linux = "x64/libbass.so"; + }; + urlpath = "bass${version}-linux.zip"; + sha256 = "1a2z9isabkymz7qmkgklbjpj2wxkvv1cngfp9aj0c9178v97pjd7"; + }; + + bass_fx = { + h = "C/bass_fx.h"; + so = { + i686_linux = "libbass_fx.so"; + x86_64-linux = "x64/libbass_fx.so"; + }; + urlpath = "z/0/bass_fx${version}-linux.zip"; + sha256 = "0j1cbq88j3vnqf2bibcqnfhciz904w48ldgycyh9d8954hwyg22m"; + }; + }; + + dropBass = name: bass: stdenv.mkDerivation { + name = "lib${name}-${version}"; + + src = fetchurl { + url = "https://www.un4seen.com/files/${bass.urlpath}"; + inherit (bass) sha256; + }; + unpackCmd = '' + mkdir out + ${unzip}/bin/unzip $curSrc -d out + ''; + + lpropagatedBuildInputs = [ unzip ]; + dontBuild = true; + installPhase = + let so = + if bass.so ? ${stdenv.system} then bass.so.${stdenv.system} + else abort "${name} not packaged for ${stdenv.system} (yet)."; + in '' + mkdir -p $out/{lib,include} + install -m644 -t $out/lib/ ${so} + install -m644 -t $out/include/ ${bass.h} + ''; + + meta = with stdenv.lib; { + description = "Shareware audio library"; + homepage = https://www.un4seen.com/; + license = licenses.unfreeRedistributable; + }; + }; + +in stdenv.lib.mapAttrs dropBass allBass |