2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, unzip, fetchurl }:
|
2017-06-14 09:29:31 +00:00
|
|
|
|
2019-08-17 07:46:32 +00: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 09:29:31 +00:00
|
|
|
|
2019-08-17 07:46:32 +00:00
|
|
|
let
|
2017-06-14 09:29:31 +00:00
|
|
|
allBass = {
|
|
|
|
bass = {
|
|
|
|
h = "bass.h";
|
2020-04-02 23:48:40 +00:00
|
|
|
version = "2.4.15";
|
2017-06-14 09:29:31 +00:00
|
|
|
so = {
|
|
|
|
i686_linux = "libbass.so";
|
|
|
|
x86_64-linux = "x64/libbass.so";
|
|
|
|
};
|
2019-08-17 07:46:32 +00:00
|
|
|
urlpath = "bass24-linux.zip";
|
2021-07-20 15:20:44 +00:00
|
|
|
sha256 = "1lmysxfhy727zskavml3ibg5w876ir88923bm17c21s59w5lh7l8";
|
2017-06-14 09:29:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
bass_fx = {
|
|
|
|
h = "C/bass_fx.h";
|
2019-08-17 07:46:32 +00:00
|
|
|
version = "2.4.12.1";
|
2017-06-14 09:29:31 +00:00
|
|
|
so = {
|
|
|
|
i686_linux = "libbass_fx.so";
|
|
|
|
x86_64-linux = "x64/libbass_fx.so";
|
|
|
|
};
|
2019-08-17 07:46:32 +00:00
|
|
|
urlpath = "z/0/bass_fx24-linux.zip";
|
2019-05-06 23:32:25 +00:00
|
|
|
sha256 = "1q0g74z7iyhxqps5b3gnnbic8v2jji1r0mkvais57lsx8y21sbin";
|
2017-06-14 09:29:31 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
dropBass = name: bass: stdenv.mkDerivation {
|
2019-08-17 07:46:32 +00:00
|
|
|
pname = "lib${name}";
|
|
|
|
inherit (bass) version;
|
2017-06-14 09:29:31 +00: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 19:11:29 +00: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 09:29:31 +00: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 09:29:31 +00:00
|
|
|
description = "Shareware audio library";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.un4seen.com/";
|
2017-06-14 09:29:31 +00:00
|
|
|
license = licenses.unfreeRedistributable;
|
2017-08-29 09:04:59 +00:00
|
|
|
platforms = builtins.attrNames bass.so;
|
2021-12-10 19:15:48 +00:00
|
|
|
# until upstream has stable URLs, this package is prone to always being broken
|
|
|
|
broken = true;
|
2017-06-14 09:29:31 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
in lib.mapAttrs dropBass allBass
|