summary refs log tree commit diff
path: root/pkgs/tools/filesystems/mtdutils/default.nix
blob: 9e7e3a16e01cb340080f6c6cea7d3451febccf27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{stdenv, fetchgit, libuuid, lzo, zlib, acl}:

let
  version = "1.3.1";
in
stdenv.mkDerivation {
  name = "mtd-utils-${version}";

  src = fetchgit {
    url = git://git.infradead.org/mtd-utils.git;
    rev = "v" + version;
    sha256 = "0pjjs9x03bgvphqwlw99c2cpkpjsx0vkqi79vjl7fcb9pyrghgd1";
  };

  patchPhase = ''
    sed -i -e s,/usr/local,, -e s,/usr,$out, common.mk

    # gcc 4.5.1 issues a warning where 4.4.3 did not
    sed -i -e s/-Werror// ubi-utils/old-utils/Makefile
  '';

  buildInputs = [ libuuid lzo zlib acl ];

  crossAttrs = {
    makeFlags = "CC=${stdenv.cross.config}-gcc";
  };

  meta = {
    description = "Tools for MTD filesystems";
    license = "GPLv2+";
    homepage = http://www.linux-mtd.infradead.org/;
    maintainers = with stdenv.lib.maintainers; [viric];
    platforms = with stdenv.lib.platforms; linux;
  };
}