18 # To use the full release version:
19 # 1) Sign into https://backstage.renoise.com and download the release version to some stable location.
20 # 2) Override the releasePath attribute to point to the location of the newly downloaded bundle.
21 # Note: Renoise creates an individual build for each license which screws somewhat with the
22 # use of functions like requireFile as the hash will be different for every user.
26 archSuffix = "x86_64";
27 hash = "sha256-b+YXBVnxu54HfC/tWapcs/ZYzwBOJswYbEbEU3SVNss=";
31 hash = "sha256-l54FAtT+Rj4Mv3GuOF0/9WuKdJowgbZDZYo7VCh6Flg=";
35 in stdenv.mkDerivation rec {
39 src = if releasePath != null then
43 platform = platforms.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
44 urlVersion = lib.replaceStrings [ "." ] [ "_" ] version;
47 "https://files.renoise.com/demo/Renoise_${urlVersion}_Demo_Linux_${platform.archSuffix}.tar.gz"
48 "https://files.renoise.com/demo/archive/Renoise_${urlVersion}_Demo_Linux_${platform.archSuffix}.tar.gz"
70 cp renoise $out/renoise
72 for path in ${toString buildInputs}; do
73 ln -s $path/lib/*.so* $out/lib/
76 ln -s ${lib.getLib stdenv.cc.cc}/lib/libstdc++.so.6 $out/lib/
79 ln -s $out/renoise $out/bin/renoise
82 mkdir -p $out/share/applications
83 cp -r Installer/renoise.desktop $out/share/applications/renoise.desktop
86 mkdir -p $out/share/icons/hicolor/{48x48,64x64,128x128}/apps
87 cp Installer/renoise-48.png $out/share/icons/hicolor/48x48/apps/renoise.png
88 cp Installer/renoise-64.png $out/share/icons/hicolor/64x64/apps/renoise.png
89 cp Installer/renoise-128.png $out/share/icons/hicolor/128x128/apps/renoise.png
94 --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
95 --set-rpath ${mpg123}/lib:$out/lib \
98 for path in $out/AudioPluginServer*; do
100 --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
101 --set-rpath $out/lib \
105 substituteInPlace $out/share/applications/renoise.desktop \
106 --replace Exec=renoise Exec=$out/bin/renoise
109 passthru.updateScript = writeScript "update-renoise" ''
110 #!/usr/bin/env nix-shell
111 #!nix-shell -I nixpkgs=./. -i bash -p curl htmlq common-updater-scripts
115 curl 'https://files.renoise.com/demo/' \
117 | grep -E '^Renoise_([0-9]+_?)+_Demo_Linux_x86_64\.tar\.gz$' \
118 | grep -Eo '[0-9]+(_[0-9]+)*' \
122 hash_x86_64="$(nix-prefetch-url "https://files.renoise.com/demo/Renoise_$(echo "$new_version" | tr . _)_Demo_Linux_x86_64.tar.gz")"
123 hash_arm64="$( nix-prefetch-url "https://files.renoise.com/demo/Renoise_$(echo "$new_version" | tr . _)_Demo_Linux_arm64.tar.gz")"
124 sri_x86_64="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$hash_x86_64")"
125 sri_arm64="$( nix --extra-experimental-features nix-command hash to-sri --type sha256 "$hash_arm64")"
126 update-source-version renoise "$new_version" "$sri_x86_64" --system="x86_64-linux" --ignore-same-version
127 update-source-version renoise "$new_version" "$sri_arm64" --system="aarch64-linux" --ignore-same-version
131 description = "Modern tracker-based DAW";
132 homepage = "https://www.renoise.com/";
133 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
134 license = lib.licenses.unfree;
135 maintainers = with lib.maintainers; [ uakci ];
136 platforms = lib.attrNames platforms;
137 mainProgram = "renoise";