nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 64 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 rocmUpdateScript, 6 cmake, 7 clang, 8 libxml2, 9 rocm-merged-llvm, 10 zlib, 11 zstd, 12 perl, 13}: 14 15stdenv.mkDerivation (finalAttrs: { 16 pname = "hipify"; 17 version = "6.3.3"; 18 19 src = fetchFromGitHub { 20 owner = "ROCm"; 21 repo = "HIPIFY"; 22 rev = "rocm-${finalAttrs.version}"; 23 hash = "sha256-o/1LNsNtAyQcSug1gf7ujGNRRbvC33kwldrJKZi2LA0="; 24 }; 25 26 nativeBuildInputs = [ 27 cmake 28 ]; 29 30 buildInputs = [ 31 libxml2 32 rocm-merged-llvm 33 zlib 34 zstd 35 perl 36 ]; 37 38 postPatch = '' 39 substituteInPlace CMakeLists.txt \ 40 --replace "\''${LLVM_TOOLS_BINARY_DIR}/clang" "${clang}/bin/clang" 41 chmod +x bin/* 42 ''; 43 44 passthru.updateScript = rocmUpdateScript { 45 name = finalAttrs.pname; 46 inherit (finalAttrs.src) owner; 47 inherit (finalAttrs.src) repo; 48 }; 49 50 postInstall = '' 51 chmod +x $out/bin/* 52 chmod +x $out/libexec/* 53 patchShebangs $out/bin/ 54 patchShebangs $out/libexec/ 55 ''; 56 57 meta = with lib; { 58 description = "Convert CUDA to Portable C++ Code"; 59 homepage = "https://github.com/ROCm/HIPIFY"; 60 license = with licenses; [ mit ]; 61 teams = [ teams.rocm ]; 62 platforms = platforms.linux; 63 }; 64})