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/tools/misc/thin-provisioning-tools | |
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/tools/misc/thin-provisioning-tools')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/thin-provisioning-tools/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/thin-provisioning-tools/default.nix b/nixpkgs/pkgs/tools/misc/thin-provisioning-tools/default.nix new file mode 100644 index 000000000000..b4683167f334 --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/thin-provisioning-tools/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, expat, libaio, boost }: + +stdenv.mkDerivation rec { + name = "thin-provisioning-tools-${version}"; + version = "0.7.6"; + + src = fetchFromGitHub { + owner = "jthornber"; + repo = "thin-provisioning-tools"; + rev = "v${version}"; + sha256 = "175mk3krfdmn43cjw378s32hs62gq8fmq549rjmyc651sz6jnj0g"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + + buildInputs = [ expat libaio boost ]; + + patches = [ + (fetchpatch { + # a) Fix build if limits.h provides definition for PAGE_SIZE, as musl does w/musl per XSI[1] although it's apparently optional [2]. + # This value is only provided when it's known to be a constant, to avoid the need to discover the value dynamically. + # b) If not using system-provided (kernel headers, or libc headers, or something) use the POSIX approach of querying the value + # dynamically using sysconf(_SC_PAGE_SIZE) instead of hardcoded value that hopefully is correct. + # [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html + # [2] http://www.openwall.com/lists/musl/2015/09/11/8 + url = "https://raw.githubusercontent.com/voidlinux/void-packages/a0ece13ad7ab2aae760e09e41e0459bd999a3695/srcpkgs/thin-provisioning-tools/patches/musl.patch"; + sha256 = "1m8r3vhrnsy8drgs0svs3fgpi3mmxzdcqsv6bmvc0j52cvfqvhvy"; + extraPrefix = ""; # empty means add 'a/' and 'b/' + }) + ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = https://github.com/jthornber/thin-provisioning-tools/; + description = "A suite of tools for manipulating the metadata of the dm-thin device-mapper target"; + license = licenses.gpl3; + platforms = platforms.unix; + maintainers = with maintainers; [ globin ]; + }; +} |