2017-06-01 22:35:40 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, utillinux, bash }:
|
2014-02-01 12:30:23 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "bcache-tools-${version}";
|
2014-05-25 13:15:25 +02:00
|
|
|
version = "1.0.7";
|
2014-02-01 12:30:23 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-06-01 22:17:47 +02:00
|
|
|
name = "${name}.tar.gz";
|
2014-02-01 12:30:23 +01:00
|
|
|
url = "https://github.com/g2p/bcache-tools/archive/v${version}.tar.gz";
|
2014-05-25 13:15:25 +02:00
|
|
|
sha256 = "1gbsh2qw0a7kgck6w0apydiy37nnz5xvdgipa0yqrfmghl86vmv4";
|
2014-02-01 12:30:23 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ utillinux ];
|
2014-02-01 12:30:23 +01:00
|
|
|
|
|
|
|
# * Remove broken install rules (they ignore $PREFIX) for stuff we don't need
|
|
|
|
# anyway (it's distro specific stuff).
|
|
|
|
# * Fixup absolute path to modprobe.
|
|
|
|
prePatch = ''
|
|
|
|
sed -e "/INSTALL.*initramfs\/hook/d" \
|
|
|
|
-e "/INSTALL.*initcpio\/install/d" \
|
|
|
|
-e "/INSTALL.*dracut\/module-setup.sh/d" \
|
|
|
|
-i Makefile
|
|
|
|
'';
|
|
|
|
|
2015-06-12 22:57:05 +02:00
|
|
|
patches = [
|
|
|
|
./bcache-udev-modern.patch
|
|
|
|
./fix-static.patch
|
|
|
|
];
|
2014-11-02 16:57:19 +01:00
|
|
|
|
2014-02-01 12:30:23 +01:00
|
|
|
preBuild = ''
|
|
|
|
export makeFlags="$makeFlags PREFIX=\"$out\" UDEVLIBDIR=\"$out/lib/udev/\"";
|
2017-06-01 22:35:40 +02:00
|
|
|
sed -e "s|/bin/sh|${bash}/bin/sh|" -i *.rules
|
2014-02-01 12:30:23 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/sbin" "$out/lib/udev/rules.d" "$out/share/man/man8"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "User-space tools required for bcache (Linux block layer cache)";
|
|
|
|
longDescription = ''
|
|
|
|
Bcache is a Linux kernel block layer cache. It allows one or more fast
|
|
|
|
disk drives such as flash-based solid state drives (SSDs) to act as a
|
|
|
|
cache for one or more slower hard disk drives.
|
|
|
|
|
|
|
|
This package contains the required user-space tools.
|
|
|
|
|
|
|
|
User documentation is in Documentation/bcache.txt in the Linux kernel
|
|
|
|
tree.
|
|
|
|
'';
|
2017-08-02 23:50:51 +02:00
|
|
|
homepage = https://bcache.evilpiepirate.org/;
|
2014-02-01 12:30:23 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|