depot/third_party/nixpkgs/pkgs/tools/filesystems/mtdutils/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

41 lines
1.1 KiB
Nix

{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, cmocka, acl, libuuid, lzo, zlib, zstd }:
stdenv.mkDerivation rec {
pname = "mtd-utils";
version = "2.1.5";
src = fetchgit {
url = "git://git.infradead.org/mtd-utils.git";
rev = "v${version}";
sha256 = "sha256-Ph9Xjb2Nyo7l3T1pDgW2gnSJxn0pOC6uvCGUfCh0MXU=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ] ++ lib.optional doCheck cmocka;
buildInputs = [ acl libuuid lzo zlib zstd ];
enableParallelBuilding = true;
configureFlags = with lib; [
(enableFeature doCheck "unit-tests")
(enableFeature doCheck "tests")
];
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
outputs = [ "out" "dev" ];
postInstall = ''
mkdir -p $dev/lib
mv *.a $dev/lib/
mv include $dev/
'';
meta = with lib; {
description = "Tools for MTD filesystems";
downloadPage = "https://git.infradead.org/mtd-utils.git";
license = licenses.gpl2Plus;
homepage = "http://www.linux-mtd.infradead.org/";
maintainers = with maintainers; [ viric ];
platforms = with platforms; linux;
};
}