Archived
1
0
forked from rarias/bscpkgs
This repository has been archived on 2025-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
bscpkgs/pkgs/aocc/unwrapped.nix
2025-09-29 12:54:23 +02:00

52 lines
971 B
Nix

{ lib
, fetchurl
, stdenv
, autoPatchelfHook
, rocmPackages
, zlib
, libffi
, elfutils
}:
let
# in newer nixpkgs the runtime is hsakmt
rocmRuntime =
if rocmPackages ? hsakmt then
rocmPackages.hsakmt
else
rocmPackages.rocm-runtime;
in
stdenv.mkDerivation {
pname = "aocc-compiler";
version = "5.0.0";
src = fetchurl {
url = "https://download.amd.com/developer/eula/aocc/aocc-5-0/aocc-compiler-5.0.0.tar";
sha256 = "sha256-lm+sLSx1np3m6WnBCtp6ezBsET9/HgfqN2gp7IY4Dao=";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
elfutils
zlib
rocmRuntime
stdenv.cc.cc.lib
];
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
dontStrip = true;
installPhase = ''
mkdir -p $out
cp -a . $out/
ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib/libffi.so.6
'';
passthru = {
inherit rocmRuntime;
isClang = true; # Needed for wrapCCWith
};
meta.mainProgram = "clang";
}