diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/attr | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/attr')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/attr/default.nix | 33 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/attr/fix-headers-musl.patch | 54 |
2 files changed, 87 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/attr/default.nix b/nixpkgs/pkgs/development/libraries/attr/default.nix new file mode 100644 index 000000000000..f859894cd47b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/attr/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, gettext }: + +stdenv.mkDerivation rec { + name = "attr-2.4.47"; + + src = fetchurl { + url = "mirror://savannah/attr/${name}.src.tar.gz"; + sha256 = "0nd8y0m6awc9ahv0ciiwf8gy54c8d3j51pw9xg7f7cn579jjyxr5"; + }; + + outputs = [ "bin" "dev" "out" "man" "doc" ]; + + nativeBuildInputs = [ gettext ]; + + configureFlags = [ "MAKE=make" "MSGFMT=msgfmt" "MSGMERGE=msgmerge" "XGETTEXT=xgettext" "ECHO=echo" "SED=sed" "AWK=gawk" ]; + + installTargets = [ "install" "install-lib" "install-dev" ]; + + patches = if (stdenv.hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null; + + postPatch = '' + for script in install-sh include/install-sh; do + patchShebangs $script + done + ''; + + meta = with stdenv.lib; { + homepage = "https://savannah.nongnu.org/projects/attr/"; + description = "Library and tools for manipulating extended attributes"; + platforms = platforms.linux; + license = licenses.gpl2Plus; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/attr/fix-headers-musl.patch b/nixpkgs/pkgs/development/libraries/attr/fix-headers-musl.patch new file mode 100644 index 000000000000..e969f640eeef --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/attr/fix-headers-musl.patch @@ -0,0 +1,54 @@ +--- attr-2.4.47/include/xattr.h ++++ attr-2.4.47/include/xattr.h +@@ -31,33 +31,37 @@ + #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ + + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + extern int setxattr (const char *__path, const char *__name, +- const void *__value, size_t __size, int __flags) __THROW; ++ const void *__value, size_t __size, int __flags); + extern int lsetxattr (const char *__path, const char *__name, +- const void *__value, size_t __size, int __flags) __THROW; ++ const void *__value, size_t __size, int __flags); + extern int fsetxattr (int __filedes, const char *__name, +- const void *__value, size_t __size, int __flags) __THROW; ++ const void *__value, size_t __size, int __flags); + + extern ssize_t getxattr (const char *__path, const char *__name, +- void *__value, size_t __size) __THROW; ++ void *__value, size_t __size); + extern ssize_t lgetxattr (const char *__path, const char *__name, +- void *__value, size_t __size) __THROW; ++ void *__value, size_t __size); + extern ssize_t fgetxattr (int __filedes, const char *__name, +- void *__value, size_t __size) __THROW; ++ void *__value, size_t __size); + + extern ssize_t listxattr (const char *__path, char *__list, +- size_t __size) __THROW; ++ size_t __size); + extern ssize_t llistxattr (const char *__path, char *__list, +- size_t __size) __THROW; ++ size_t __size); + extern ssize_t flistxattr (int __filedes, char *__list, +- size_t __size) __THROW; ++ size_t __size); + +-extern int removexattr (const char *__path, const char *__name) __THROW; +-extern int lremovexattr (const char *__path, const char *__name) __THROW; +-extern int fremovexattr (int __filedes, const char *__name) __THROW; ++extern int removexattr (const char *__path, const char *__name); ++extern int lremovexattr (const char *__path, const char *__name); ++extern int fremovexattr (int __filedes, const char *__name); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __XATTR_H__ */ |