From acd17d21b38c03235a35dab7e8af1df7069f41fd Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 2 Sep 2015 17:39:42 -0700 Subject: [PATCH] mtpfs: Fix accidental deletion --- pkgs/tools/filesystems/go-mtpfs/default.nix | 29 --------------------- pkgs/tools/filesystems/mtpfs/default.nix | 26 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +-- 3 files changed, 28 insertions(+), 31 deletions(-) delete mode 100644 pkgs/tools/filesystems/go-mtpfs/default.nix create mode 100644 pkgs/tools/filesystems/mtpfs/default.nix diff --git a/pkgs/tools/filesystems/go-mtpfs/default.nix b/pkgs/tools/filesystems/go-mtpfs/default.nix deleted file mode 100644 index cf521425a76d..000000000000 --- a/pkgs/tools/filesystems/go-mtpfs/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ lib, goPackages, pkgconfig, libmtp, fetchFromGitHub }: - -with goPackages; - -buildGoPackage rec { - rev = "9c2b46050e8ea8574eaec2124867ac7b11e6471d"; - name = "go-mtpfs-${lib.strings.substring 0 7 rev}"; - goPackagePath = "github.com/hanwen/go-mtpfs"; - src = fetchFromGitHub { - inherit rev; - owner = "hanwen"; - repo = "go-mtpfs"; - sha256 = "0kxi18cb078q4wikfajp3yvp802wzfsfdp431j0dg2jdw8y7gfii"; - }; - - buildInputs = [ go-fuse libmtp usb ]; - - subPackages = [ "./" ]; - - dontInstallSrc = true; - - meta = with lib; { - description = "A simple FUSE filesystem for mounting Android devices as a MTP device"; - homepage = https://github.com/hanwen/go-mtpfs; - maintainers = with maintainers; [ bennofs ]; - platforms = platforms.linux; - license = licenses.bsd3; - }; -} diff --git a/pkgs/tools/filesystems/mtpfs/default.nix b/pkgs/tools/filesystems/mtpfs/default.nix new file mode 100644 index 000000000000..7725b0d7af8e --- /dev/null +++ b/pkgs/tools/filesystems/mtpfs/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, pkgconfig, fuse, libmtp, glib, libmad, libid3tag }: + +stdenv.mkDerivation rec { + name = "mtpfs-1.1"; + + buildInputs = [ pkgconfig fuse libmtp glib libid3tag libmad ]; + + # adding LIBS is a hack, duno why it does not find libid3tag.so by adding buildInputs + preConfigure = '' + export MAD_CFLAGS=${libmad}/include + export MAD_LIBS=${libmad}/lib/libmad.so + export LIBS=${libid3tag}/lib/libid3tag.so + ''; + + src = fetchurl { + url = "http://www.adebenham.com/files/mtp/${name}.tar.gz"; + sha256 = "07acrqb17kpif2xcsqfqh5j4axvsa4rnh6xwnpqab5b9w5ykbbqv"; + }; + + meta = { + homepage = https://code.google.com/p/mtpfs/; + description = "FUSE Filesystem providing access to MTP devices"; + platforms = stdenv.lib.platforms.all; + maintainers = [ stdenv.lib.maintainers.qknight ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a04874e49e4e..eb9fc9c4376c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1693,7 +1693,7 @@ let goaccess = callPackage ../tools/misc/goaccess { }; - go-mtpfs = callPackage ../tools/filesystems/go-mtpfs { }; + go-mtpfs = pkgs.goPackages.mtpfs.bin // { outputs = [ "bin" ]; }; googleAuthenticator = callPackage ../os-specific/linux/google-authenticator { }; @@ -7713,7 +7713,7 @@ let mtdev = callPackage ../development/libraries/mtdev { }; - mtpfs = pkgs.goPackages.mtpfs.bin // { outputs = [ "bin" ]; }; + mtpfs = callPackage ../tools/filesystems/mtpfs { }; mu = callPackage ../tools/networking/mu { texinfo = texinfo4;