nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 46 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7 numactl, 8}: 9 10buildPythonPackage { 11 pname = "py-libnuma"; 12 version = "1.2"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "eedalong"; 17 repo = "pynuma"; 18 rev = "66cab0e008b850a04cfec5c4fb3f50bf28e3d488"; 19 hash = "sha256-ALYCcdN5eXrVWsTRwkHCwo4xsLMs/du3mUl1xSlo5iU="; 20 }; 21 22 postPatch = '' 23 substituteInPlace numa/__init__.py \ 24 --replace-fail \ 25 'LIBNUMA = CDLL(find_library("numa"))' \ 26 'LIBNUMA = CDLL("${numactl}/lib/libnuma${stdenv.hostPlatform.extensions.sharedLibrary}")' 27 ''; 28 29 build-system = [ setuptools ]; 30 31 dependencies = [ 32 numactl 33 ]; 34 35 # Tests write NUMA configuration, which may be persistent until reboot. 36 doCheck = false; 37 38 pythonImportsCheck = [ "numa" ]; 39 40 meta = { 41 description = "Python3 Interface to numa Linux library"; 42 homepage = "https://github.com/eedalong/pynuma"; 43 platforms = lib.platforms.linux; 44 license = lib.licenses.mit; 45 }; 46}