nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 rocmUpdateScript,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "hip-common";
10 version = "7.1.1";
11
12 src = fetchFromGitHub {
13 owner = "ROCm";
14 repo = "HIP";
15 rev = "rocm-${finalAttrs.version}";
16 hash = "sha256-aI41HdyzyE5HtCbzFmTQYGMiFyQELM/MTVOAbQsg8So=";
17 };
18
19 dontConfigure = true;
20 dontBuild = true;
21
22 installPhase = ''
23 runHook preInstall
24
25 mkdir -p $out
26 mv * $out
27
28 runHook postInstall
29 '';
30
31 passthru.updateScript = rocmUpdateScript {
32 name = finalAttrs.pname;
33 inherit (finalAttrs.src) owner;
34 inherit (finalAttrs.src) repo;
35 };
36
37 meta = {
38 description = "C++ Heterogeneous-Compute Interface for Portability";
39 homepage = "https://github.com/ROCm/HIP";
40 license = with lib.licenses; [ mit ];
41 maintainers = with lib.maintainers; [ lovesegfault ];
42 teams = [ lib.teams.rocm ];
43 platforms = lib.platforms.linux;
44 };
45})