From 05f9c44a02224e3099d474999cc62070ce085e83 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sat, 12 Oct 2024 11:15:28 +0200 Subject: [PATCH 1/2] aocl-utils: 4.2 -> 5.0 --- pkgs/by-name/ao/aocl-utils/package.nix | 11 +++++++++-- pkgs/by-name/ao/aocl-utils/pkg-config.patch | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 pkgs/by-name/ao/aocl-utils/pkg-config.patch diff --git a/pkgs/by-name/ao/aocl-utils/package.nix b/pkgs/by-name/ao/aocl-utils/package.nix index b4a64d316c657..6bb0dc69601a2 100644 --- a/pkgs/by-name/ao/aocl-utils/package.nix +++ b/pkgs/by-name/ao/aocl-utils/package.nix @@ -2,17 +2,24 @@ stdenv.mkDerivation rec { pname = "aocl-utils"; - version = "4.2"; + version = "5.0"; src = fetchFromGitHub { owner = "amd"; repo = "aocl-utils"; rev = version; - hash = "sha256-tjmCgVSU4XjBhbKMUY3hsvj3bvuXvVdf5Bqva5nr1tc="; + hash = "sha256-96j3Sw+Ts+CZzjPpUlt8cRYO5z0iASo+W/x1nrrAyQE="; }; + patches = [ ./pkg-config.patch ]; + nativeBuildInputs = [ cmake ]; + cmakeFlags = [ + (lib.cmakeBool "AU_BUILD_STATIC_LIBS" stdenv.hostPlatform.isStatic) + (lib.cmakeBool "AU_BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + ]; + meta = with lib; { description = "Interface to all AMD AOCL libraries to access CPU features"; homepage = "https://github.com/amd/aocl-utils"; diff --git a/pkgs/by-name/ao/aocl-utils/pkg-config.patch b/pkgs/by-name/ao/aocl-utils/pkg-config.patch new file mode 100644 index 0000000000000..ba0cd1848c15e --- /dev/null +++ b/pkgs/by-name/ao/aocl-utils/pkg-config.patch @@ -0,0 +1,14 @@ +diff --git a/CMake/aocl-utils.pc.in b/CMake/aocl-utils.pc.in +index 18ce5eb..bcdc39b 100644 +--- a/CMake/aocl-utils.pc.in ++++ b/CMake/aocl-utils.pc.in +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} +-libdir=${prefix}/@AU_INSTALL_LIB_DIR@ +-includedir=${prefix}/@AU_INSTALL_INCLUDE_DIR@ ++libdir=@AU_INSTALL_LIB_DIR@ ++includedir=@AU_INSTALL_INCLUDE_DIR@ + + Name: @PROJECT_FULL_NAME@ + Description: @AU_DESCRIPTION@ From ed49a126f1551dc3d64e24f0a3d17e32a90f3da2 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sat, 12 Oct 2024 11:16:41 +0200 Subject: [PATCH 2/2] aocl-utils: apply nixfmt --- pkgs/by-name/ao/aocl-utils/package.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ao/aocl-utils/package.nix b/pkgs/by-name/ao/aocl-utils/package.nix index 6bb0dc69601a2..1dc44ad7c08cd 100644 --- a/pkgs/by-name/ao/aocl-utils/package.nix +++ b/pkgs/by-name/ao/aocl-utils/package.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, cmake } : +{ + lib, + stdenv, + fetchFromGitHub, + cmake, +}: stdenv.mkDerivation rec { pname = "aocl-utils";