nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 68 lines 1.9 kB view raw
1{ lib, stdenv, unzip, fetchurl }: 2 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 7 8let 9 allBass = { 10 bass = { 11 h = "bass.h"; 12 version = "2.4.15"; 13 so = { 14 i686_linux = "libbass.so"; 15 x86_64-linux = "x64/libbass.so"; 16 }; 17 urlpath = "bass24-linux.zip"; 18 sha256 = "1lmysxfhy727zskavml3ibg5w876ir88923bm17c21s59w5lh7l8"; 19 }; 20 21 bass_fx = { 22 h = "C/bass_fx.h"; 23 version = "2.4.12.1"; 24 so = { 25 i686_linux = "libbass_fx.so"; 26 x86_64-linux = "x64/libbass_fx.so"; 27 }; 28 urlpath = "z/0/bass_fx24-linux.zip"; 29 sha256 = "1q0g74z7iyhxqps5b3gnnbic8v2jji1r0mkvais57lsx8y21sbin"; 30 }; 31 }; 32 33 dropBass = name: bass: stdenv.mkDerivation { 34 pname = "lib${name}"; 35 inherit (bass) version; 36 37 src = fetchurl { 38 url = "https://www.un4seen.com/files/${bass.urlpath}"; 39 inherit (bass) sha256; 40 }; 41 unpackCmd = '' 42 mkdir out 43 ${unzip}/bin/unzip $curSrc -d out 44 ''; 45 46 lpropagatedBuildInputs = [ unzip ]; 47 dontBuild = true; 48 installPhase = 49 let so = 50 if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system} 51 else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet)."; 52 in '' 53 mkdir -p $out/{lib,include} 54 install -m644 -t $out/lib/ ${so} 55 install -m644 -t $out/include/ ${bass.h} 56 ''; 57 58 meta = with lib; { 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 64 broken = true; 65 }; 66 }; 67 68in lib.mapAttrs dropBass allBass