13 recommendedUdevRules ? true,
16 stdenv.mkDerivation rec {
17 pname = "roomeqwizard";
21 url = "https://www.roomeqwizard.com/installers/REW_linux_no_jre_${
22 lib.replaceStrings [ "." ] [ "_" ] version
24 sha256 = "sha256-qaGkKVoiBJ2UWVKAMqbuqNFi6FGcblMxAbYwhf/71CY=";
29 desktopItem = makeDesktopItem {
34 genericName = "Software for audio measurements";
35 categories = [ "AudioVideo" ];
38 responseFile = writeTextFile {
39 name = "response.varfile";
41 createDesktopLinkAction$Boolean=false
42 executeLauncherAction$Boolean=false
45 sys.adminRights$Boolean=false
46 sys.installationDir=INSTALLDIR
48 sys.programGroupDisabled$Boolean=true
53 # MiniDSP UMIK-1 calibrated USB microphone
54 SUBSYSTEM=="usb", ATTR{idVendor}=="2752", ATTR{idProduct}=="0007", TAG+="uaccess"
57 nativeBuildInputs = [ makeWrapper ];
62 # set JDK path in installer
63 sed -E 's|^#\s*(INSTALL4J_JAVA_HOME_OVERRIDE=)|\1${jdk8}|' $src > installer
66 sed -e "s|INSTALLDIR|$out/share/roomeqwizard|" $responseFile > response.varfile
70 ./installer -q -varfile response.varfile
78 mkdir -p $out/bin $out/lib/udev/rules.d $out/share/icons/hicolor/256x256/apps
79 makeWrapper $out/share/roomeqwizard/roomeqwizard $out/bin/roomeqwizard \
80 --set INSTALL4J_JAVA_HOME_OVERRIDE ${jdk8} \
89 cp -r "$desktopItem/share/applications" $out/share/
90 cp $out/share/roomeqwizard/.install4j/roomeqwizard.png "$out/share/icons/hicolor/256x256/apps/${pname}.png"
92 ${lib.optionalString recommendedUdevRules ''echo "$udevRules" > $out/lib/udev/rules.d/90-roomeqwizard.rules''}
97 passthru.updateScript = writeScript "${pname}-update.sh" ''
98 #!/usr/bin/env nix-shell
99 #!nix-shell -i bash -p curl common-updater-scripts nixpkgs-fmt coreutils perl
103 perlexpr='if (/current version.{1,10}v(\d+)\.(\d+)\.(\d+)/i) { print "$1.$2.$3"; break; }'
105 oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion ${pname}" | tr -d '"')"
106 latestVersion="$(curl -sS https://www.roomeqwizard.com/index.html | perl -ne "$perlexpr")"
108 if [ ! "$oldVersion" = "$latestVersion" ]; then
109 update-source-version ${pname} "$latestVersion" --version-key=version --print-changes
110 nixpkgs-fmt "pkgs/applications/audio/roomeqwizard/default.nix"
112 echo "${pname} is already up-to-date"
117 homepage = "https://www.roomeqwizard.com/";
118 license = licenses.unfree;
119 platforms = platforms.all;
120 maintainers = with maintainers; [
124 description = "Room Acoustics Software";
126 REW is free software for room acoustic measurement, loudspeaker
127 measurement and audio device measurement.
129 mainProgram = "roomeqwizard";