1 { stdenv, lib, fetchurl }:
3 stdenv.mkDerivation rec {
4 pname = "libhugetlbfs";
8 url = "https://github.com/libhugetlbfs/libhugetlbfs/releases/download/${version}/libhugetlbfs-${version}.tar.gz";
9 sha256 = "0ya4q001g111d3pqlzrf3yaifadl0ccirx5dndz1pih7x3qp41mp";
14 url = "https://build.opensuse.org/public/source/openSUSE:Factory/libhugetlbfs/glibc-2.34-fix.patch?rev=50";
15 sha256 = "sha256-eRQa6M0ZdHMtwA5nnzDTWYv/x4AnRZhj+MpDiwyCvVM=";
19 outputs = [ "bin" "dev" "man" "doc" "lib" "out" ];
22 patchShebangs ld.hugetlbfs
25 enableParallelBuilding = true;
27 "BUILDTYPE=NATIVEONLY"
29 "HEADERDIR=$(dev)/include"
30 "LIBDIR32=$(lib)/$(LIB32)"
31 "LIBDIR64=$(lib)/$(LIB64)"
33 "DOCDIR=$(doc)/share/doc/libhugetlbfs"
34 "MANDIR=$(man)/share/man"
35 ] ++ lib.optionals (stdenv.buildPlatform.system != stdenv.hostPlatform.system) [
36 # The ARCH logic defaults to querying `uname`, which will return build platform arch
37 "ARCH=${stdenv.hostPlatform.uname.processor}"
40 # Default target builds tests as well, and the tests want a static
42 buildFlags = [ "libs" "tools" ];
43 installTargets = [ "install" "install-docs" ];
46 description = "library and utilities for Linux hugepages";
47 maintainers = with maintainers; [ qyliss ];
48 license = licenses.lgpl21Plus;
49 platforms = platforms.linux;
50 badPlatforms = flatten [
51 systems.inspect.platformPatterns.isStatic
52 systems.inspect.patterns.isMusl