at 24.11-pre 45 lines 1.1 kB view raw
1{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, cmocka, acl, libuuid, lzo, zlib, zstd }: 2 3stdenv.mkDerivation rec { 4 pname = "mtd-utils"; 5 version = "2.2.0"; 6 7 src = fetchgit { 8 url = "git://git.infradead.org/mtd-utils.git"; 9 rev = "v${version}"; 10 sha256 = "sha256-uYXzZnVL5PkyDAntH8YsocwmQ8tf1f0Vl78SdE2B+Oc="; 11 }; 12 13 nativeBuildInputs = [ autoreconfHook pkg-config ] ++ lib.optional doCheck cmocka; 14 buildInputs = [ acl libuuid lzo zlib zstd ]; 15 16 enableParallelBuilding = true; 17 18 configureFlags = with lib; [ 19 (enableFeature doCheck "unit-tests") 20 (enableFeature doCheck "tests") 21 ]; 22 23 makeFlags = [ 24 "AR:=$(AR)" 25 ]; 26 27 doCheck = stdenv.hostPlatform == stdenv.buildPlatform; 28 29 outputs = [ "out" "dev" ]; 30 31 postInstall = '' 32 mkdir -p $dev/lib 33 mv *.a $dev/lib/ 34 mv include $dev/ 35 ''; 36 37 meta = with lib; { 38 description = "Tools for MTD filesystems"; 39 downloadPage = "https://git.infradead.org/mtd-utils.git"; 40 license = licenses.gpl2Plus; 41 homepage = "http://www.linux-mtd.infradead.org/"; 42 maintainers = with maintainers; [ viric ]; 43 platforms = with platforms; linux; 44 }; 45}