nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 54 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 dpkg, 6 libdrm, 7 amdenc, 8 autoPatchelfHook, 9}: 10 11let 12 amdgpuVersion = "6.1.3"; 13 ubuntuVersion = "22.04"; 14in 15stdenv.mkDerivation (finalAttrs: { 16 pname = "amf"; 17 version = "1.4.34-1787253"; 18 19 src = fetchurl { 20 url = "https://repo.radeon.com/amdgpu/${amdgpuVersion}/ubuntu/pool/proprietary/a/amf-amdgpu-pro/amf-amdgpu-pro_${finalAttrs.version}.${ubuntuVersion}_amd64.deb"; 21 hash = "sha256-5sMI0ktqQDTu5xOKP9T9vjaSIHQizF1wHhqJcVnY40c="; 22 }; 23 24 nativeBuildInputs = [ 25 dpkg 26 autoPatchelfHook 27 ]; 28 29 buildInputs = [ 30 libdrm 31 amdenc 32 ]; 33 34 installPhase = '' 35 runHook preInstall 36 37 install -Dm755 opt/amdgpu-pro/lib/x86_64-linux-gnu/* -t $out/lib 38 39 runHook postInstall 40 ''; 41 42 preFixup = '' 43 patchelf $out/lib/* --add-needed libamdenc64.so 44 ''; 45 46 meta = { 47 description = "AMD's closed source Advanced Media Framework (AMF) driver"; 48 homepage = "https://www.amd.com/en/support/download/drivers.html"; 49 license = lib.licenses.unfree; 50 platforms = [ "x86_64-linux" ]; 51 sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 52 maintainers = with lib.maintainers; [ jopejoe1 ]; 53 }; 54})