2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, alsaLib, libX11, libXi, SDL2 }:
|
2018-01-08 01:35:29 +00:00
|
|
|
|
|
|
|
let
|
2021-01-15 13:21:58 +00:00
|
|
|
libPath = lib.makeLibraryPath [ stdenv.cc.cc alsaLib libX11 libXi SDL2 ];
|
2018-01-08 01:35:29 +00:00
|
|
|
arch =
|
|
|
|
if stdenv.isAarch64
|
|
|
|
then "arm64"
|
treewide: isArm -> isAarch32
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.
The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:
```
ISA: ARMv8 {-A, -R, -M}
/ \
Mode: Aarch32 Aarch64
| / \
Encoding: A64 A32 T32
```
At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.
The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.
[1]: https://developer.arm.com/products/architecture/a-profile
2018-03-20 02:41:06 +00:00
|
|
|
else if stdenv.isAarch32
|
2018-01-08 01:35:29 +00:00
|
|
|
then "arm_armhf_raspberry_pi"
|
|
|
|
else if stdenv.is64bit
|
|
|
|
then "x86_64"
|
|
|
|
else "x86";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "SunVox";
|
2021-01-07 03:06:28 +00:00
|
|
|
version = "1.9.6c";
|
2018-01-08 01:35:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.warmplace.ru/soft/sunvox/sunvox-${version}.zip";
|
2021-01-07 03:06:28 +00:00
|
|
|
sha256 = "0lqzr68n2c6aifw2vbyars91wn1chmgb9xfdk463g4vjqiava3ih";
|
2018-01-08 01:35:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
|
|
|
unpackPhase = "unzip $src";
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share $out/bin
|
|
|
|
mv sunvox $out/share/
|
|
|
|
|
|
|
|
bin="$out/share/sunvox/sunvox/linux_${arch}/sunvox"
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${libPath}" \
|
|
|
|
"$bin"
|
|
|
|
|
|
|
|
ln -s "$bin" $out/bin/sunvox
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-01-08 01:35:29 +00:00
|
|
|
description = "Small, fast and powerful modular synthesizer with pattern-based sequencer";
|
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
homepage = "http://www.warmplace.ru/soft/sunvox/";
|
|
|
|
maintainers = with maintainers; [ puffnfresh ];
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|