2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, unzip, fetchurl }:
|
2017-06-14 11:29:31 +02:00
|
|
|
|
2019-08-17 09:46:32 +02:00
|
|
|
# Upstream changes files in-place, to update:
|
|
|
|
# 1. Check latest version at http://www.un4seen.com/
|
|
|
|
# 2. Update `version`s and `sha256` sums.
|
|
|
|
# See also http://www.un4seen.com/forum/?topic=18614.0
|
2017-06-14 11:29:31 +02:00
|
|
|
|
2019-08-17 09:46:32 +02:00
|
|
|
let
|
2017-06-14 11:29:31 +02:00
|
|
|
allBass = {
|
|
|
|
bass = {
|
|
|
|
h = "bass.h";
|
2020-04-03 01:48:40 +02:00
|
|
|
version = "2.4.15";
|
2017-06-14 11:29:31 +02:00
|
|
|
so = {
|
|
|
|
i686_linux = "libbass.so";
|
|
|
|
x86_64-linux = "x64/libbass.so";
|
|
|
|
};
|
2019-08-17 09:46:32 +02:00
|
|
|
urlpath = "bass24-linux.zip";
|
2020-04-07 21:25:11 +02:00
|
|
|
sha256 = "1z01im0l2ydi608vc0n0c1cfyp1vrh6681zn2zkhg98vvs20y805";
|
2017-06-14 11:29:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
bass_fx = {
|
|
|
|
h = "C/bass_fx.h";
|
2019-08-17 09:46:32 +02:00
|
|
|
version = "2.4.12.1";
|
2017-06-14 11:29:31 +02:00
|
|
|
so = {
|
|
|
|
i686_linux = "libbass_fx.so";
|
|
|
|
x86_64-linux = "x64/libbass_fx.so";
|
|
|
|
};
|
2019-08-17 09:46:32 +02:00
|
|
|
urlpath = "z/0/bass_fx24-linux.zip";
|
2019-05-07 01:32:25 +02:00
|
|
|
sha256 = "1q0g74z7iyhxqps5b3gnnbic8v2jji1r0mkvais57lsx8y21sbin";
|
2017-06-14 11:29:31 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
dropBass = name: bass: stdenv.mkDerivation {
|
2019-08-17 09:46:32 +02:00
|
|
|
pname = "lib${name}";
|
|
|
|
inherit (bass) version;
|
2017-06-14 11:29:31 +02:00
|
|
|
|
|
|
|
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 =
|
2018-08-20 21:11:29 +02:00
|
|
|
if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system}
|
|
|
|
else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet).";
|
2017-06-14 11:29:31 +02:00
|
|
|
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";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.un4seen.com/";
|
2017-06-14 11:29:31 +02:00
|
|
|
license = licenses.unfreeRedistributable;
|
2017-08-29 11:04:59 +02:00
|
|
|
platforms = builtins.attrNames bass.so;
|
2017-06-14 11:29:31 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.lib.mapAttrs dropBass allBass
|