nixpkgs/pkgs/by-name/li/libhugetlbfs/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.6 KiB
Nix
Raw Normal View History

2024-04-02 14:17:05 +00:00
{ stdenv, lib, fetchurl, autoreconfHook }:
2020-07-26 05:36:20 +00:00
stdenv.mkDerivation rec {
pname = "libhugetlbfs";
2024-04-02 14:17:05 +00:00
version = "2.24";
2020-07-26 05:36:20 +00:00
src = fetchurl {
url = "https://github.com/libhugetlbfs/libhugetlbfs/releases/download/${version}/libhugetlbfs-${version}.tar.gz";
2024-04-02 14:17:05 +00:00
hash = "sha256-1QHfqRyOrREGlno9OCnyunOMP6wKZcs1jtKrOHDdxe8=";
2020-07-26 05:36:20 +00:00
};
outputs = [ "bin" "dev" "man" "doc" "lib" "out" ];
2024-04-02 14:17:05 +00:00
nativeBuildInputs = [ autoreconfHook ];
2020-07-26 05:36:20 +00:00
postConfigure = ''
patchShebangs ld.hugetlbfs
'';
enableParallelBuilding = true;
makeFlags = [
"BUILDTYPE=NATIVEONLY"
"PREFIX=$(out)"
"HEADERDIR=$(dev)/include"
"LIBDIR32=$(lib)/$(LIB32)"
"LIBDIR64=$(lib)/$(LIB64)"
"EXEDIR=$(bin)/bin"
"DOCDIR=$(doc)/share/doc/libhugetlbfs"
"MANDIR=$(man)/share/man"
2023-11-09 20:40:02 +00:00
] ++ lib.optionals (stdenv.buildPlatform.system != stdenv.hostPlatform.system) [
# The ARCH logic defaults to querying `uname`, which will return build platform arch
"ARCH=${stdenv.hostPlatform.uname.processor}"
];
2020-07-26 05:36:20 +00:00
# Default target builds tests as well, and the tests want a static
# libc.
buildFlags = [ "libs" "tools" ];
installTargets = [ "install" "install-docs" ];
meta = with lib; {
homepage = "https://github.com/libhugetlbfs/libhugetlbfs";
changelog = "https://github.com/libhugetlbfs/libhugetlbfs/blob/${version}/NEWS";
2020-07-26 05:36:20 +00:00
description = "library and utilities for Linux hugepages";
maintainers = with maintainers; [ qyliss ];
license = licenses.lgpl21Plus;
platforms = platforms.linux;
badPlatforms = flatten [
systems.inspect.platformPatterns.isStatic
systems.inspect.patterns.isMusl
];
2020-07-26 05:36:20 +00:00
};
}