diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-07-26 05:36:20 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-12-11 03:01:09 +0000 |
commit | 958319a973dc307cdb338539ffaa7a543cd2c670 (patch) | |
tree | a585d30ccfb3b733f41a4e3b0df856c59545694d /nixpkgs/pkgs/development/libraries | |
parent | 118c43e0a66afc91465fbbf4b92f239a67eb7e55 (diff) | |
download | nixlib-958319a973dc307cdb338539ffaa7a543cd2c670.tar nixlib-958319a973dc307cdb338539ffaa7a543cd2c670.tar.gz nixlib-958319a973dc307cdb338539ffaa7a543cd2c670.tar.bz2 nixlib-958319a973dc307cdb338539ffaa7a543cd2c670.tar.lz nixlib-958319a973dc307cdb338539ffaa7a543cd2c670.tar.xz nixlib-958319a973dc307cdb338539ffaa7a543cd2c670.tar.zst nixlib-958319a973dc307cdb338539ffaa7a543cd2c670.zip |
libhugetlbfs: init at 2.22
(cherry picked from commit 5e7d581ffdba220d088ed92f382a41acb37670e1)
Diffstat (limited to 'nixpkgs/pkgs/development/libraries')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libhugetlbfs/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libhugetlbfs/default.nix b/nixpkgs/pkgs/development/libraries/libhugetlbfs/default.nix new file mode 100644 index 000000000000..ed5f67d43709 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libhugetlbfs/default.nix @@ -0,0 +1,51 @@ +{ stdenv, lib, fetchurl, fetchpatch }: + +stdenv.mkDerivation rec { + pname = "libhugetlbfs"; + version = "2.22"; + + src = fetchurl { + url = "https://github.com/libhugetlbfs/libhugetlbfs/releases/download/${version}/libhugetlbfs-${version}.tar.gz"; + sha256 = "11b7k8xvgx68rjzidm12a6l6b23hwi7hj149y9xxfz2j5kmakp4l"; + }; + + outputs = [ "bin" "dev" "man" "doc" "lib" "out" ]; + + patches = [ + # Don't check that 32-bit and 64-bit libraries don't get installed + # to the same place if only one platform is being built for. + # Can be removed if build succeeds without it. + (fetchpatch { + url = "https://groups.google.com/forum/message/raw?msg=libhugetlbfs/IswjDAygfwA/PKy7MZbVAAAJ"; + sha256 = "00fyrhn380d6swil8pcf4x0krl1113ghswrvjn3m9czc3h4p385a"; + }) + ]; + + 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" + ] ++ map (n: "MANDIR${n}=$(man)/share/man/man${n}") + (lib.genList (n: toString (n + 1)) 8); + + # Default target builds tests as well, and the tests want a static + # libc. + buildFlags = [ "libs" "tools" ]; + installTargets = [ "install" "install-docs" ]; + + meta = with lib; { + description = "library and utilities for Linux hugepages"; + maintainers = with maintainers; [ qyliss ]; + license = licenses.lgpl21Plus; + platforms = platforms.linux; + }; +} |