9pfs: 2015-09-18 -> 0.3 (#241801)

* _9pfs: 2015-09-18 -> 0.3

* _9pfs: add updateScript

authored by Jacob Moody and committed by GitHub dfdbcc42 4577f470

+11 -72
+11 -25
pkgs/tools/filesystems/9pfs/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, fuse }: 1 + { lib, stdenv, fetchFromGitHub, pkg-config, fuse, gitUpdater }: 2 2 3 - stdenv.mkDerivation { 3 + stdenv.mkDerivation rec { 4 4 pname = "9pfs"; 5 - version = "unstable-2015-09-18"; 5 + version = "0.3"; 6 6 7 7 src = fetchFromGitHub { 8 - owner = "mischief"; 8 + owner = "ftrvxmtrx"; 9 9 repo = "9pfs"; 10 - rev = "7f4ca4cd750d650c1215b92ac3cc2a28041960e4"; 11 - sha256 = "007s2idsn6bspmfxv1qabj39ggkgvn6gwdbhczwn04lb4c6gh3xc"; 10 + rev = version; 11 + sha256 = "sha256-ywWG/H2ilt36mjlDSgIzYpardCFXpmbLiml6wy47XuA="; 12 12 }; 13 13 14 - # Upstream development has stopped and is no longer accepting patches 15 - # https://github.com/mischief/9pfs/pull/3 16 - patches = [ ./fix-darwin-build.patch ]; 17 - 18 - preConfigure = 19 - '' 20 - substituteInPlace Makefile --replace '-g bin' "" 21 - installFlagsArray+=(BIN=$out/bin MAN=$out/share/man/man1) 22 - mkdir -p $out/bin $out/share/man/man1 23 - ''; 24 - 14 + makeFlags = [ "BIN=$(out)/bin" "MAN=$(out)/share/man/man1" ]; 15 + nativeBuildInputs = [ pkg-config ]; 25 16 buildInputs = [ fuse ]; 26 - 27 - # Workaround build failure on -fno-common toolchains like upstream 28 - # gcc-10. Otherwise build fails as: 29 - # ld: lib/auth_rpc.o:/build/source/lib/../9pfs.h:35: multiple definition of 30 - # `logfile'; 9pfs.o:/build/source/9pfs.h:35: first defined here 31 - env.NIX_CFLAGS_COMPILE = "-fcommon"; 17 + enableParallelBuilding = true; 32 18 33 - enableParallelBuilding = true; 19 + passthru.updateScript = gitUpdater { }; 34 20 35 21 meta = { 36 - homepage = "https://github.com/mischief/9pfs"; 22 + homepage = "https://github.com/ftrvxmtrx/9pfs"; 37 23 description = "FUSE-based client of the 9P network filesystem protocol"; 38 24 maintainers = [ lib.maintainers.eelco ]; 39 25 platforms = lib.platforms.unix;
-47
pkgs/tools/filesystems/9pfs/fix-darwin-build.patch
··· 1 - From 6b7863b51c97f8ecd9a93fc4347f8938f9b5c05f Mon Sep 17 00:00:00 2001 2 - From: midchildan <git@midchildan.org> 3 - Date: Tue, 30 Mar 2021 22:21:51 +0900 4 - Subject: [PATCH] build: fix build for macOS 5 - 6 - --- 7 - 9pfs.c | 4 ++-- 8 - libc.h | 4 ++++ 9 - 2 files changed, 6 insertions(+), 2 deletions(-) 10 - 11 - diff --git a/9pfs.c b/9pfs.c 12 - index 2c481bd..f5c487c 100644 13 - --- a/9pfs.c 14 - +++ b/9pfs.c 15 - @@ -30,7 +30,7 @@ 16 - enum 17 - { 18 - CACHECTLSIZE = 8, /* sizeof("cleared\n") - 1 */ 19 - - MSIZE = 8192 20 - + MSIZE_9P = 8192 21 - }; 22 - 23 - void dir2stat(struct stat*, Dir*); 24 - @@ -505,7 +505,7 @@ main(int argc, char *argv[]) 25 - freeaddrinfo(ainfo); 26 - 27 - init9p(); 28 - - msize = _9pversion(MSIZE); 29 - + msize = _9pversion(MSIZE_9P); 30 - if(doauth){ 31 - authfid = _9pauth(AUTHFID, user, NULL); 32 - ai = auth_proxy(authfid, auth_getkey, "proto=p9any role=client"); 33 - diff --git a/libc.h b/libc.h 34 - index 099adba..aac03c5 100644 35 - --- a/libc.h 36 - +++ b/libc.h 37 - @@ -61,6 +61,10 @@ typedef unsigned char uchar; 38 - typedef unsigned long long uvlong; 39 - typedef long long vlong; 40 - 41 - +#ifndef __GLIBC__ 42 - +typedef unsigned long ulong; 43 - +#endif 44 - + 45 - typedef 46 - struct Qid 47 - {