1{ lib, fetchFromGitHub, rustPlatform }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "unpfs";
5 version = "unstable-2021-04-23";
6
7 src = fetchFromGitHub {
8 owner = "pfpacket";
9 repo = "rust-9p";
10 rev = "6d9b62aa182c5764e00b96f93109feb605d9eac9";
11 sha256 = "sha256-zyDkUb+bFsVnxAE4UODbnRtDim7gqUNuY22vuxMsLZM=";
12 };
13
14 sourceRoot = "source/example/unpfs";
15
16 cargoSha256 = "sha256-v8hbxKuxux0oYglEIK5dM9q0oBQzjyYDP1JB1cYR/T0=";
17
18 RUSTC_BOOTSTRAP = 1;
19
20 postInstall = ''
21 install -D -m 0444 ../../README* -t "$out/share/doc/${pname}"
22 install -D -m 0444 ../../LICEN* -t "$out/share/doc/${pname}"
23 '';
24
25 meta = with lib; {
26 description = "9P2000.L server implementation in Rust";
27 homepage = "https://github.com/pfpacket/rust-9p";
28 license = licenses.bsd3;
29 maintainers = with maintainers; [ raskin ];
30
31 # macOS build fails: https://github.com/pfpacket/rust-9p/issues/7
32 platforms = with platforms; linux;
33 };
34}