11 # The last known good firmware package to have been tested
12 # by the upstream projet.
13 # The firmware URL is hardcoded in the upstream project's installation script
14 firmwareUrl = "https://download.microsoft.com/download/F/9/9/F99791F2-D5BE-478A-B77A-830AD14950C3/KinectSDK-v1.0-beta2-x86.msi";
15 # The original URL "https://research.microsoft.com/en-us/um/legal/kinectsdk-tou_noncommercial.htm"
16 # redirects to the following url:
17 licenseUrl = "https://www.microsoft.com/en-us/legal/terms-of-use";
19 stdenv.mkDerivation rec {
20 pname = "kinect-audio-setup";
22 # On update: Make sure that the `firmwareURL` is still in sync with upstream.
23 # If the project structure hasn't changed you can find the URL in the
24 # `kinect_fetch_fw` file in the project source.
27 # This is an MSI or CAB file
28 FIRMWARE = requireFile rec {
30 sha256 = "08a2vpgd061cmc6h3h8i6qj3sjvjr1fwcnwccwywqypz3icn8xw1";
32 In order to install the Kinect Audio Firmware, you need to download the
33 non-redistributable firmware from Microsoft.
34 The firmware is available at ${firmwareUrl} and the license at ${licenseUrl} .
35 Save the file as UACFirmware and use "nix-prefetch-url file://\$PWD/UACFirmware" to
36 add it to the Nix store.
41 url = "git://git.ao2.it/kinect-audio-setup.git";
43 hash = "sha256-bFwmWh822KvFwP/0Gu097nF5K2uCwCLMB1RtP7k+Zt0=";
46 # These patches are not upstream because the project has seen no
49 ./libusb-1-import-path.patch
50 ./udev-rules-extra-devices.patch
53 nativeBuildInputs = [ p7zip libusb1 pkg-config ];
58 "FIRMWARE_PATH=$(out)/lib/firmware/UACFirmware"
59 "LOADER_PATH=$(out)/libexec/kinect_upload_fw"
64 make -C kinect_upload_fw kinect_upload_fw $makeFlags "''${makeFlagsArray[@]}"
70 mkdir -p $out/libexec/ $out/lib/firmware $out/lib/udev/rules.d
72 install -Dm755 kinect_upload_fw/kinect_upload_fw $out/libexec/
74 # 7z extract "assume yes on all queries" "only extract/keep files/directories matching UACFIRMWARE.* recursively"
75 7z e -y -r "${FIRMWARE}" "UACFirmware.*" >/dev/null
76 # The filename is bound to change with the Firmware SDK
77 mv UACFirmware.* $out/lib/firmware/UACFirmware
79 make install_udev_rules $makeFlags "''${makeFlagsArray[@]}"
85 description = "Tools to enable audio input from the Microsoft Kinect sensor device";
86 homepage = "https://git.ao2.it/kinect-audio-setup.git";
87 maintainers = with maintainers; [ berbiche ];
88 platforms = platforms.linux;
89 license = licenses.unfree;