2021-07-28 15:25:04 +00:00
|
|
|
{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, cmocka, acl, libuuid, lzo, zlib, zstd }:
|
2010-04-29 17:54:51 +00:00
|
|
|
|
2019-10-15 17:35:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "mtd-utils";
|
2022-12-27 19:45:50 +00:00
|
|
|
version = "2.1.5";
|
2010-04-29 17:54:51 +00:00
|
|
|
|
2021-07-28 15:25:04 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.infradead.org/mtd-utils.git";
|
|
|
|
rev = "v${version}";
|
2022-12-27 19:45:50 +00:00
|
|
|
sha256 = "sha256-Ph9Xjb2Nyo7l3T1pDgW2gnSJxn0pOC6uvCGUfCh0MXU=";
|
2010-04-29 17:54:51 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ] ++ lib.optional doCheck cmocka;
|
2019-10-15 17:35:14 +00:00
|
|
|
buildInputs = [ acl libuuid lzo zlib zstd ];
|
2010-04-29 17:54:51 +00:00
|
|
|
|
2023-01-11 13:00:53 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-03-11 19:04:42 +00:00
|
|
|
configureFlags = with lib; [
|
|
|
|
(enableFeature doCheck "unit-tests")
|
|
|
|
(enableFeature doCheck "tests")
|
2019-12-28 11:35:49 +00:00
|
|
|
];
|
2019-10-15 17:35:14 +00:00
|
|
|
|
2019-12-28 11:35:49 +00:00
|
|
|
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
2010-04-29 17:54:51 +00:00
|
|
|
|
2023-01-11 13:01:03 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev/lib
|
|
|
|
mv *.a $dev/lib/
|
|
|
|
mv include $dev/
|
|
|
|
'';
|
|
|
|
|
2021-03-11 19:04:42 +00:00
|
|
|
meta = with lib; {
|
2010-04-29 17:54:51 +00:00
|
|
|
description = "Tools for MTD filesystems";
|
2021-07-28 15:25:04 +00:00
|
|
|
downloadPage = "https://git.infradead.org/mtd-utils.git";
|
2021-03-11 19:04:42 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2019-10-15 17:35:14 +00:00
|
|
|
homepage = "http://www.linux-mtd.infradead.org/";
|
2021-11-03 00:38:27 +00:00
|
|
|
maintainers = with maintainers; [ viric ];
|
2021-03-11 19:04:42 +00:00
|
|
|
platforms = with platforms; linux;
|
2010-04-29 17:54:51 +00:00
|
|
|
};
|
|
|
|
}
|