2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, unzip, fetchurl }:
|
2017-06-14 10:29:31 +01:00
|
|
|
|
2019-08-17 08:46:32 +01: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 10:29:31 +01:00
|
|
|
|
2019-08-17 08:46:32 +01:00
|
|
|
let
|
2017-06-14 10:29:31 +01:00
|
|
|
allBass = {
|
|
|
|
bass = {
|
|
|
|
h = "bass.h";
|
2020-04-03 00:48:40 +01:00
|
|
|
version = "2.4.15";
|
2017-06-14 10:29:31 +01:00
|
|
|
so = {
|
|
|
|
i686_linux = "libbass.so";
|
|
|
|
x86_64-linux = "x64/libbass.so";
|
|
|
|
};
|
2019-08-17 08:46:32 +01:00
|
|
|
urlpath = "bass24-linux.zip";
|
2020-04-07 20:25:11 +01:00
|
|
|
sha256 = "1z01im0l2ydi608vc0n0c1cfyp1vrh6681zn2zkhg98vvs20y805";
|
2017-06-14 10:29:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
bass_fx = {
|
|
|
|
h = "C/bass_fx.h";
|
2019-08-17 08:46:32 +01:00
|
|
|
version = "2.4.12.1";
|
2017-06-14 10:29:31 +01:00
|
|
|
so = {
|
|
|
|
i686_linux = "libbass_fx.so";
|
|
|
|
x86_64-linux = "x64/libbass_fx.so";
|
|
|
|
};
|
2019-08-17 08:46:32 +01:00
|
|
|
urlpath = "z/0/bass_fx24-linux.zip";
|
2019-05-07 00:32:25 +01:00
|
|
|
sha256 = "1q0g74z7iyhxqps5b3gnnbic8v2jji1r0mkvais57lsx8y21sbin";
|
2017-06-14 10:29:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
dropBass = name: bass: stdenv.mkDerivation {
|
2019-08-17 08:46:32 +01:00
|
|
|
pname = "lib${name}";
|
|
|
|
inherit (bass) version;
|
2017-06-14 10:29:31 +01: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 20:11:29 +01: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 10:29:31 +01:00
|
|
|
in ''
|
|
|
|
mkdir -p $out/{lib,include}
|
|
|
|
install -m644 -t $out/lib/ ${so}
|
|
|
|
install -m644 -t $out/include/ ${bass.h}
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2017-06-14 10:29:31 +01:00
|
|
|
description = "Shareware audio library";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.un4seen.com/";
|
2017-06-14 10:29:31 +01:00
|
|
|
license = licenses.unfreeRedistributable;
|
2017-08-29 10:04:59 +01:00
|
|
|
platforms = builtins.attrNames bass.so;
|
2017-06-14 10:29:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
in lib.mapAttrs dropBass allBass
|