Files
nixpkgs/pkgs/by-name/am/amf/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
dpkg,
libdrm,
amdenc,
autoPatchelfHook,
}:
let
amdgpuVersion = "6.1.3";
ubuntuVersion = "22.04";
in
stdenv.mkDerivation (finalAttrs: {
pname = "amf";
version = "1.4.34-1787253";
src = fetchurl {
url = "https://repo.radeon.com/amdgpu/${amdgpuVersion}/ubuntu/pool/proprietary/a/amf-amdgpu-pro/amf-amdgpu-pro_${finalAttrs.version}.${ubuntuVersion}_amd64.deb";
hash = "sha256-5sMI0ktqQDTu5xOKP9T9vjaSIHQizF1wHhqJcVnY40c=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
];
buildInputs = [
libdrm
amdenc
];
installPhase = ''
runHook preInstall
install -Dm755 opt/amdgpu-pro/lib/x86_64-linux-gnu/* -t $out/lib
runHook postInstall
'';
preFixup = ''
patchelf $out/lib/* --add-needed libamdenc64.so
'';
meta = {
description = "AMD's closed source Advanced Media Framework (AMF) driver";
homepage = "https://www.amd.com/en/support/download/drivers.html";
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = with lib.maintainers; [ jopejoe1 ];
};
})