From 3f523771bcb532f127d7a278e0a58b29d54e1a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Feb 2012 00:01:29 +0000 Subject: [PATCH] Add SMBFS for GNU/Hurd. svn path=/nixpkgs/trunk/; revision=32499 --- pkgs/os-specific/gnu/default.nix | 7 ++++- pkgs/os-specific/gnu/smbfs/default.nix | 41 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/gnu/smbfs/default.nix diff --git a/pkgs/os-specific/gnu/default.nix b/pkgs/os-specific/gnu/default.nix index 3978979d7020..326918dd55ef 100644 --- a/pkgs/os-specific/gnu/default.nix +++ b/pkgs/os-specific/gnu/default.nix @@ -1,7 +1,7 @@ # Packages that make up the GNU/Hurd operating system (aka. GNU). args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool -, texinfo, glibcCross, hurdPartedCross, libuuid +, texinfo, glibcCross, hurdPartedCross, libuuid, samba_light , gccCrossStageStatic, gccCrossStageFinal , forceBuildDrv, callPackage, platform, config, crossSystem }: @@ -86,4 +86,9 @@ rec { }).stdenv; } else { }); + + smbfs = callPackage ./smbfs { + samba = samba_light; + hurd = hurdCross; + }; } diff --git a/pkgs/os-specific/gnu/smbfs/default.nix b/pkgs/os-specific/gnu/smbfs/default.nix new file mode 100644 index 000000000000..f95b22a4669d --- /dev/null +++ b/pkgs/os-specific/gnu/smbfs/default.nix @@ -0,0 +1,41 @@ +{ fetchcvs, stdenv, hurd, machHeaders, samba }: + +let + date = "2011-11-14"; +in +stdenv.mkDerivation rec { + name = "smbfs-${date}"; + + src = fetchcvs { + cvsRoot = ":pserver:anonymous@cvs.savannah.nongnu.org:/sources/hurdextras"; + module = "smbfs"; + sha256 = "b36765fde77c6cafb04ab1ff44b19bb00b490064b5a02b9ced7828170ab47a70"; + inherit date; + }; + + patchPhase = + '' sed -i "Makefile" \ + -e 's|gcc|i586-pc-gnu-gcc|g ; + s|^LDFLAGS=\(.*\)$|LDFLAGS=\1 -pthread|g' + ''; + + buildInputs = [ hurd machHeaders samba ]; + + 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 ]; + }; +}