summary refs log tree commit diff
path: root/pkgs/os-specific/gnu/smbfs/default.nix
blob: 4897c0c0af8098d2ba2eb7123233ac35ebe627f5 (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
36
37
38
39
40
41
42
43
44
{ fetchcvs, stdenv, hurd, machHeaders, samba }:

let
  date = "2012-03-15";
  samba_patched = stdenv.lib.overrideDerivation samba (attrs: {
    patches = attrs.patches ++ [ ./samba-without-byte-range-locks.patch ];
  });
in
stdenv.mkDerivation rec {
  name = "smbfs-${date}";

  src = fetchcvs {
    cvsRoot = ":pserver:anonymous@cvs.savannah.nongnu.org:/sources/hurdextras";
    module = "smbfs";
    sha256 = "5941d1a5da4488cbf0efe9aa0b41fe4ff5ba57b84ed24f7ff7c0feda4501d3e3";
    inherit date;
  };

  patchPhase =
    '' sed -i "Makefile" \
           -e 's|gcc|i586-pc-gnu-gcc|g ;
               s|^LDFLAGS=\(.*\)$|LDFLAGS=\1 -pthread|g'
    '';

  buildInputs = [ hurd machHeaders samba_patched ];

  installPhase =
    '' mkdir -p "$out/hurd"
       cp -v smbfs "$out/hurd"

       mkdir -p "$out/share/doc/${name}"
       cp -v README "$out/share/doc/${name}"
    '';

  meta = {
    description = "SMB/CIFS file system translator for GNU/Hurd";

    homepage = http://www.nongnu.org/hurdextras/;

    license = "GPLv3+";

    maintainers = [ stdenv.lib.maintainers.ludo ];
  };
}