diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/rocm-core')
4 files changed, 0 insertions, 155 deletions
diff --git a/nixpkgs/pkgs/development/libraries/rocm-core/default.nix b/nixpkgs/pkgs/development/libraries/rocm-core/default.nix deleted file mode 100644 index 9f1a4ab4ccf5..000000000000 --- a/nixpkgs/pkgs/development/libraries/rocm-core/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, runCommand -, substituteAll -, cmake -}: - -let - rocm_version = with lib; concatStrings (intersperse "0" (splitString "." stdenv.cc.version)); -in stdenv.mkDerivation (finalAttrs: { - pname = "rocm-core"; - version = stdenv.cc.version; - - # Based on https://github.com/rocm-arch/rocm-arch/tree/ad0b15690d403e5822db062ffff4db3912de6669/rocm-core - src = let - rocm_major = lib.versions.major finalAttrs.version; - rocm_minor = lib.versions.minor finalAttrs.version; - rocm_patch = lib.versions.patch finalAttrs.version; - - cmake_lists = substituteAll { - inherit rocm_version; - src = ./src/CMakeLists.txt; - }; - - version_c = substituteAll { - inherit rocm_major rocm_minor rocm_patch; - src = ./src/rocm_version.c; - }; - - version_h = substituteAll { - inherit rocm_major rocm_minor rocm_patch; - src = ./src/rocm_version.h; - }; - in runCommand "rocm-core-${finalAttrs.version}-source" { preferLocalBuild = true; } '' - mkdir -p $out/rocm-core - ln -s ${cmake_lists} $out/CMakeLists.txt - ln -s ${version_c} $out/rocm_version.c - ln -s ${version_h} $out/rocm-core/rocm_version.h - ''; - - nativeBuildInputs = [ cmake ]; - - postInstall = '' - mkdir -p $out/include - cp -a ../rocm-core $out/include - ln -s $out/include/rocm-core/rocm_version.h $out/include - ln -s $out/lib/librocm-core.so.1.0.${rocm_version} $out/lib/librocm-core.so.1 - ''; - - meta = with lib; { - description = "ROCm core"; - homepage = "https://docs.amd.com"; - license = with licenses; [ ncsa ]; # See src/rocm_version.h - maintainers = teams.rocm.members; - platforms = platforms.linux; - }; -}) diff --git a/nixpkgs/pkgs/development/libraries/rocm-core/src/CMakeLists.txt b/nixpkgs/pkgs/development/libraries/rocm-core/src/CMakeLists.txt deleted file mode 100644 index b2d9fc1f53b8..000000000000 --- a/nixpkgs/pkgs/development/libraries/rocm-core/src/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.23) -project(rocm-core) -add_library(rocm-core SHARED rocm_version.c) -set_target_properties(rocm-core PROPERTIES VERSION "1.0.@rocm_version@") -install(TARGETS rocm-core LIBRARY DESTINATION lib) diff --git a/nixpkgs/pkgs/development/libraries/rocm-core/src/rocm_version.c b/nixpkgs/pkgs/development/libraries/rocm-core/src/rocm_version.c deleted file mode 100644 index a35dfc6a72c8..000000000000 --- a/nixpkgs/pkgs/development/libraries/rocm-core/src/rocm_version.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "rocm-core/rocm_version.h" - -VerErrors getROCmVersion(unsigned int *Major, unsigned int *Minor, - unsigned int *Patch) { - *Major = @rocm_major@; - *Minor = @rocm_minor@; - *Patch = @rocm_patch@; - - return 0; -} diff --git a/nixpkgs/pkgs/development/libraries/rocm-core/src/rocm_version.h b/nixpkgs/pkgs/development/libraries/rocm-core/src/rocm_version.h deleted file mode 100644 index d112a68b8653..000000000000 --- a/nixpkgs/pkgs/development/libraries/rocm-core/src/rocm_version.h +++ /dev/null @@ -1,82 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// The University of Illinois/NCSA -// Open Source License (NCSA) -// -// Copyright (c) 2014-2021, Advanced Micro Devices, Inc. All rights reserved. -// -// Developed by: -// -// AMD Research and AMD HSA Software Development -// -// Advanced Micro Devices, Inc. -// -// www.amd.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal with the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// - Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimers. -// - Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimers in -// the documentation and/or other materials provided with the distribution. -// - Neither the names of Advanced Micro Devices, Inc, -// nor the names of its contributors may be used to endorse or promote -// products derived from this Software without specific prior written -// permission. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS WITH THE SOFTWARE. -// -//////////////////////////////////////////////////////////////////////////////// - - -#ifndef _ROCM_VERSION_H_ -#define _ROCM_VERSION_H_ - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define ROCM_VERSION_MAJOR @rocm_major@ -#define ROCM_VERSION_MINOR @rocm_minor@ -#define ROCM_VERSION_PATCH @rocm_patch@ - - -typedef enum { - VerSuccess=0, - VerIncorrecPararmeters, - VerValuesNotDefined, - VerErrorMAX //This should always be last value in the enumerations -} VerErrors; - - -// API for getting the verion -// Return val : VerErros : API execution status. The parameters are valid only when the exetution status is SUCCESS==0 -VerErrors getROCmVersion(unsigned int* Major, unsigned int* Minor, unsigned int* Patch) __attribute__((nonnull)) ; -// Usage : -// int mj=0,mn=0,p=0,ret=0; -// ret=getROCMVersion(&mj,&mn,&p); -// if(ret !=VerSuccess ) // error occured -// -// check for the values and -// - - -#ifdef __cplusplus -} // end extern "C" block -#endif - -#endif //_ROCM_VERSION_H_ header guard |