mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
_9pfs: add darwin build
This commit is contained in:
parent
1c32fa7660
commit
fb60c27d93
2 changed files with 52 additions and 1 deletions
|
@ -10,6 +10,10 @@ stdenv.mkDerivation {
|
|||
sha256 = "007s2idsn6bspmfxv1qabj39ggkgvn6gwdbhczwn04lb4c6gh3xc";
|
||||
};
|
||||
|
||||
# Upstream development has stopped and is no longer accepting patches
|
||||
# https://github.com/mischief/9pfs/pull/3
|
||||
patches = [ ./fix-darwin-build.patch ];
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
substituteInPlace Makefile --replace '-g bin' ""
|
||||
|
@ -25,7 +29,7 @@ stdenv.mkDerivation {
|
|||
homepage = "https://github.com/mischief/9pfs";
|
||||
description = "FUSE-based client of the 9P network filesystem protocol";
|
||||
maintainers = [ lib.maintainers.eelco ];
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = lib.platforms.unix;
|
||||
license = with lib.licenses; [ lpl-102 bsd2 ];
|
||||
};
|
||||
}
|
||||
|
|
47
pkgs/tools/filesystems/9pfs/fix-darwin-build.patch
Normal file
47
pkgs/tools/filesystems/9pfs/fix-darwin-build.patch
Normal file
|
@ -0,0 +1,47 @@
|
|||
From 6b7863b51c97f8ecd9a93fc4347f8938f9b5c05f Mon Sep 17 00:00:00 2001
|
||||
From: midchildan <git@midchildan.org>
|
||||
Date: Tue, 30 Mar 2021 22:21:51 +0900
|
||||
Subject: [PATCH] build: fix build for macOS
|
||||
|
||||
---
|
||||
9pfs.c | 4 ++--
|
||||
libc.h | 4 ++++
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/9pfs.c b/9pfs.c
|
||||
index 2c481bd..f5c487c 100644
|
||||
--- a/9pfs.c
|
||||
+++ b/9pfs.c
|
||||
@@ -30,7 +30,7 @@
|
||||
enum
|
||||
{
|
||||
CACHECTLSIZE = 8, /* sizeof("cleared\n") - 1 */
|
||||
- MSIZE = 8192
|
||||
+ MSIZE_9P = 8192
|
||||
};
|
||||
|
||||
void dir2stat(struct stat*, Dir*);
|
||||
@@ -505,7 +505,7 @@ main(int argc, char *argv[])
|
||||
freeaddrinfo(ainfo);
|
||||
|
||||
init9p();
|
||||
- msize = _9pversion(MSIZE);
|
||||
+ msize = _9pversion(MSIZE_9P);
|
||||
if(doauth){
|
||||
authfid = _9pauth(AUTHFID, user, NULL);
|
||||
ai = auth_proxy(authfid, auth_getkey, "proto=p9any role=client");
|
||||
diff --git a/libc.h b/libc.h
|
||||
index 099adba..aac03c5 100644
|
||||
--- a/libc.h
|
||||
+++ b/libc.h
|
||||
@@ -61,6 +61,10 @@ typedef unsigned char uchar;
|
||||
typedef unsigned long long uvlong;
|
||||
typedef long long vlong;
|
||||
|
||||
+#ifndef __GLIBC__
|
||||
+typedef unsigned long ulong;
|
||||
+#endif
|
||||
+
|
||||
typedef
|
||||
struct Qid
|
||||
{
|
Loading…
Reference in a new issue