1 { lib, stdenv, unzip, fetchurl }:
3 # Upstream changes files in-place, to update:
4 # 1. Check latest version at http://www.un4seen.com/
5 # 2. Update `version`s and `sha256` sums.
6 # See also http://www.un4seen.com/forum/?topic=18614.0
14 i686_linux = "libbass.so";
15 x86_64-linux = "x64/libbass.so";
17 urlpath = "bass24-linux.zip";
18 sha256 = "1lmysxfhy727zskavml3ibg5w876ir88923bm17c21s59w5lh7l8";
25 i686_linux = "libbass_fx.so";
26 x86_64-linux = "x64/libbass_fx.so";
28 urlpath = "z/0/bass_fx24-linux.zip";
29 sha256 = "1q0g74z7iyhxqps5b3gnnbic8v2jji1r0mkvais57lsx8y21sbin";
33 dropBass = name: bass: stdenv.mkDerivation {
35 inherit (bass) version;
38 url = "https://www.un4seen.com/files/${bass.urlpath}";
39 inherit (bass) sha256;
43 ${unzip}/bin/unzip $curSrc -d out
46 lpropagatedBuildInputs = [ unzip ];
50 if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system}
51 else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet).";
53 mkdir -p $out/{lib,include}
54 install -m644 -t $out/lib/ ${so}
55 install -m644 -t $out/include/ ${bass.h}
59 description = "Shareware audio library";
60 homepage = "https://www.un4seen.com/";
61 license = licenses.unfreeRedistributable;
62 platforms = builtins.attrNames bass.so;
63 # until upstream has stable URLs, this package is prone to always being broken
68 in lib.mapAttrs dropBass allBass