nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 74 lines 2.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 autoPatchelfHook, 6 bluez, 7 libX11, 8 libXtst, 9 makeWrapper, 10 versionCheckHook, 11}: 12stdenv.mkDerivation ( 13 finalAttrs: 14 let 15 sources = { 16 "x86_64-linux" = { 17 url = "https://www.unifiedremote.com/static/builds/server/linux-x64/${builtins.elemAt (builtins.splitVersion finalAttrs.version) 3}/urserver-${finalAttrs.version}.tar.gz"; 18 hash = "sha256-4wA2VPb5QN30TWa72pUVTYfvsxlGTO8Vngh7wDHXhDE="; 19 }; 20 "aarch64-linux" = { 21 url = "https://www.unifiedremote.com/static/builds/server/linux-arm64/${builtins.elemAt (builtins.splitVersion finalAttrs.version) 3}/urserver-${finalAttrs.version}.tar.gz"; 22 hash = "sha256-GmYekCGb64GdFdABEJl9CgqycnsBX95W9/b0xZJntEs="; 23 }; 24 }; 25 in 26 27 { 28 pname = "urserver"; 29 version = "3.14.0.2574"; 30 31 src = 32 let 33 platformSource = 34 sources."${stdenv.hostPlatform.system}" 35 or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 36 in 37 fetchurl { 38 inherit (platformSource) url hash; 39 }; 40 41 nativeBuildInputs = [ 42 autoPatchelfHook 43 makeWrapper 44 ]; 45 46 buildInputs = [ (lib.getLib stdenv.cc.cc) ]; 47 48 installPhase = '' 49 install -m755 -D urserver $out/bin/urserver 50 wrapProgram $out/bin/urserver --prefix LD_LIBRARY_PATH : "${ 51 lib.makeLibraryPath [ 52 libX11 53 libXtst 54 bluez 55 ] 56 }" 57 cp -r remotes $out/bin/remotes 58 cp -r manager $out/bin/manager 59 ''; 60 61 nativeInstallCheckInputs = [ versionCheckHook ]; 62 doInstallCheck = true; 63 64 meta = { 65 homepage = "https://www.unifiedremote.com/"; 66 description = "One-and-only remote for your computer"; 67 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 68 license = lib.licenses.unfree; 69 maintainers = with lib.maintainers; [ sfrijters ]; 70 platforms = lib.attrNames sources; 71 mainProgram = "urserver"; 72 }; 73 } 74)