From 7907770a3fd2b4754be4ac4b5f7c4b9d297f6bcf Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 19 Jan 2026 22:31:07 +0000 Subject: [PATCH] mtpfs: 1.1 -> 0-unstable-2024-12-10 (`gcc-15` build fix) Without the chnage the build fails as https://hydra.nixos.org/build/318062477: mtpfs.c:1302:16: error: initialization of 'int (*)(const char *, mode_t)' {aka 'int (*)(const char *, unsigned int)'} from incompatible pointer type 'int (*)(void)' [-Wincompatible-pointer-types] 1302 | .chmod = mtpfs_blank, | ^~~~~~~~~~~ --- pkgs/by-name/mt/mtpfs/package.nix | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/mt/mtpfs/package.nix b/pkgs/by-name/mt/mtpfs/package.nix index 868ca86dfd5a..f65389f29f2d 100644 --- a/pkgs/by-name/mt/mtpfs/package.nix +++ b/pkgs/by-name/mt/mtpfs/package.nix @@ -1,20 +1,25 @@ { lib, stdenv, - fetchurl, + fetchFromGitHub, + autoreconfHook, pkg-config, fuse, libmtp, glib, libmad, libid3tag, + unstableGitUpdater, }: stdenv.mkDerivation (finalAttrs: { pname = "mtpfs"; - version = "1.1"; + version = "0-unstable-2024-12-10"; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; buildInputs = [ fuse libmtp @@ -23,9 +28,16 @@ stdenv.mkDerivation (finalAttrs: { libmad ]; - src = fetchurl { - url = "https://www.adebenham.com/files/mtp/mtpfs-${finalAttrs.version}.tar.gz"; - sha256 = "07acrqb17kpif2xcsqfqh5j4axvsa4rnh6xwnpqab5b9w5ykbbqv"; + src = fetchFromGitHub { + owner = "cjd"; + repo = "mtpfs"; + rev = "1177d6cfd8916915f5db7d9b5c6fc9e6eafae6e6"; + hash = "sha256-/84C8FUW+7U7u7yOzVB6ROoIUKtyIBG0wdD5t53yays="; + }; + + # Use unstable version to pull in gcc-15 fix until the next release + # is out: https://github.com/cjd/mtpfs/pull/28 + passthru.updateScript = unstableGitUpdater { }; meta = {