nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 llvmPackages,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "gklib";
11 version = "5.1.1-unstable-2025-07-15";
12
13 src = fetchFromGitHub {
14 owner = "KarypisLab";
15 repo = "GKlib";
16 rev = "6e7951358fd896e2abed7887196b6871aac9f2f8";
17 hash = "sha256-jT0hT5Y3E8GnE8OJWzDj5rtz9s59sMEXLduUnBV0I0Y=";
18 };
19
20 nativeBuildInputs = [ cmake ];
21
22 buildInputs = lib.optional stdenv.cc.isClang llvmPackages.openmp;
23
24 cmakeFlags = [
25 (lib.cmakeBool "OPENMP" true)
26 (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
27 # Turns off using clflush/sfence insns in gkuniq test app
28 # https://github.com/KarypisLab/GKlib/issues/11#issuecomment-1532597211
29 (lib.cmakeBool "NO_X86" (!stdenv.hostPlatform.isx86))
30 ];
31
32 meta = {
33 description = "Library of various helper routines and frameworks used by many of the lab's software";
34 homepage = "https://github.com/KarypisLab/GKlib";
35 license = lib.licenses.asl20;
36 maintainers = with lib.maintainers; [ qbisi ];
37 platforms = lib.platforms.all;
38 };
39})