2013-05-11 14:13:42 +02:00
|
|
|
{ stdenv, fetchgit, zlib, libuuid, acl, attr, e2fsprogs, lzo }:
|
2009-04-01 07:42:07 +02:00
|
|
|
|
2013-08-07 06:24:44 +02:00
|
|
|
let version = "0.20pre20130705"; in
|
2009-10-02 17:06:07 +02:00
|
|
|
|
2012-07-18 15:21:33 +02:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "btrfs-progs-${version}";
|
2009-10-02 17:06:07 +02:00
|
|
|
|
2012-07-18 15:21:33 +02:00
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git";
|
2013-08-07 06:24:44 +02:00
|
|
|
rev = "194aa4a1bd6447bb545286d0bcb0b0be8204d79f";
|
|
|
|
sha256 = "07c6762c9873cdcc1b9b3be0b412ba14b83457d8f5608d3dd945953b5e06f0f2";
|
2009-04-01 07:42:07 +02:00
|
|
|
};
|
|
|
|
|
2013-05-11 14:13:42 +02:00
|
|
|
buildInputs = [ zlib libuuid acl attr e2fsprogs lzo ];
|
2011-12-13 05:30:49 +01:00
|
|
|
|
2013-10-27 10:19:18 +01:00
|
|
|
# for btrfs to get the rpath to libgcc_s, needed for pthread_cancel to work
|
|
|
|
NIX_CFLAGS_LINK = "-lgcc_s";
|
|
|
|
|
2012-12-30 13:56:12 +01:00
|
|
|
postPatch = ''
|
|
|
|
cp ${./btrfs-set-received-uuid.c} btrfs-set-received-uuid.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
2013-05-11 14:13:42 +02:00
|
|
|
gcc -Wall -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -DBTRFS_FLAT_INCLUDES \
|
|
|
|
-fPIC -g -O1 -luuid -o btrfs-set-received-uuid rbtree.o send-utils.o btrfs-list.o \
|
|
|
|
btrfs-set-received-uuid.c
|
2012-12-30 13:56:12 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp btrfs-set-received-uuid $out/bin
|
|
|
|
'';
|
|
|
|
|
2012-07-18 15:21:33 +02:00
|
|
|
makeFlags = "prefix=$(out)";
|
2009-04-01 07:42:07 +02:00
|
|
|
|
|
|
|
meta = {
|
2012-07-18 15:21:33 +02:00
|
|
|
description = "Utilities for the btrfs filesystem";
|
|
|
|
homepage = https://btrfs.wiki.kernel.org/;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.raskin ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-04-01 07:42:07 +02:00
|
|
|
};
|
|
|
|
}
|