Merge pull request #227777 from mausch/pianoteq

pianoteq: fixes and upgrade

authored by

Ilan Joselevich and committed by
GitHub
1446190b c7591eba

+26 -18
+26 -18
pkgs/applications/audio/pianoteq/default.nix
··· 1 - { lib, stdenv, curl, jq, xorg, alsa-lib, freetype, p7zip, autoPatchelfHook, writeShellScript, zlib, libjack2, makeWrapper }: 2 let 3 versionForFile = v: builtins.replaceStrings ["."] [""] v; 4 ··· 93 fetchWithCurlScript { 94 inherit name sha256; 95 script = '' 96 "''${curl[@]}" --silent --request GET \ 97 --cookie cookies \ 98 --header "accept: */*" \ 99 - https://www.modartt.com/ -o /dev/null 100 101 - json=$( 102 - "''${curl[@]}" --silent --request POST \ 103 - --cookie cookies \ 104 - --header "modartt-json: request" \ 105 - --header "origin: https://www.modartt.com" \ 106 - --header "content-type: application/json; charset=UTF-8" \ 107 - --header "accept: application/json, text/javascript, */*" \ 108 - --data-raw '{"file": "${name}", "get": "url"}' \ 109 - https://www.modartt.com/api/0/download 110 - ) 111 112 - url=$(echo $json | ${jq}/bin/jq -r .url) 113 - "''${curl[@]}" --progress-bar --cookie cookies -o $out "$url" 114 ''; 115 }; 116 ··· 160 # TODO currently can't install more than one because `lame` clashes 161 stage-trial = mkPianoteq rec { 162 name = "stage-trial"; 163 - version = "8.0.5"; 164 archdir = "x86-64bit"; 165 src = fetchPianoteqTrial { 166 name = "pianoteq_stage_linux_trial_v${versionForFile version}.7z"; 167 - sha256 = "sha256-9Lo4e1SM1gw2/+TmpDUdZCOQcHEpT/aaG6P80/GRPQY="; 168 }; 169 }; 170 standard-trial = mkPianoteq rec { 171 name = "standard-trial"; 172 - version = "8.0.5"; 173 archdir = "x86-64bit"; 174 src = fetchPianoteqTrial { 175 name = "pianoteq_linux_trial_v${versionForFile version}.7z"; 176 - sha256 = "sha256-qxViVIbld8zTMj1+TIfOsIOhmujOGJux2/u2J4hvsqw="; 177 }; 178 }; 179 stage-6 = mkPianoteq rec {
··· 1 + { lib, stdenv, curl, jq, htmlq, xorg, alsa-lib, freetype, p7zip, autoPatchelfHook, writeShellScript, zlib, libjack2, makeWrapper }: 2 let 3 versionForFile = v: builtins.replaceStrings ["."] [""] v; 4 ··· 93 fetchWithCurlScript { 94 inherit name sha256; 95 script = '' 96 + html=$( 97 "''${curl[@]}" --silent --request GET \ 98 --cookie cookies \ 99 --header "accept: */*" \ 100 + 'https://www.modartt.com/try?file=${name}' 101 + ) 102 103 + signature="$(echo "$html" | ${htmlq}/bin/htmlq '#download-form' --attribute action | cut -f2 -d'&' | cut -f2 -d=)" 104 105 + json=$( 106 + "''${curl[@]}" --silent --request POST \ 107 + --cookie cookies \ 108 + --header "modartt-json: request" \ 109 + --header "origin: https://www.modartt.com" \ 110 + --header "content-type: application/json; charset=UTF-8" \ 111 + --header "accept: application/json, text/javascript, */*" \ 112 + --data-raw '{"file": "${name}", "get": "url", "signature": "'"$signature"'"}' \ 113 + https://www.modartt.com/api/0/download 114 + ) 115 + 116 + url=$(echo $json | ${jq}/bin/jq -r .url) 117 + if [ "$url" == "null" ]; then 118 + echo "Could not get download URL, open an issue on https://github.com/NixOS/nixpkgs" 119 + return 1 120 + fi 121 + "''${curl[@]}" --progress-bar --cookie cookies -o $out "$url" 122 ''; 123 }; 124 ··· 168 # TODO currently can't install more than one because `lame` clashes 169 stage-trial = mkPianoteq rec { 170 name = "stage-trial"; 171 + version = "8.0.8"; 172 archdir = "x86-64bit"; 173 src = fetchPianoteqTrial { 174 name = "pianoteq_stage_linux_trial_v${versionForFile version}.7z"; 175 + sha256 = "sha256-dp0bTzzh4aQ2KQ3z9zk+3meKQY4YRYQ86rccHd3+hAQ="; 176 }; 177 }; 178 standard-trial = mkPianoteq rec { 179 name = "standard-trial"; 180 + version = "8.0.8"; 181 archdir = "x86-64bit"; 182 src = fetchPianoteqTrial { 183 name = "pianoteq_linux_trial_v${versionForFile version}.7z"; 184 + sha256 = "sha256-LSrnrjkEhsX9TirUUFs9tNqH2A3cTt3I7YTfcTT6EP8="; 185 }; 186 }; 187 stage-6 = mkPianoteq rec {