3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/unpfs/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

35 lines
959 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "unpfs";
version = "0.0.2019-05-17";
src = fetchFromGitHub {
owner = "pfpacket";
repo = "rust-9p";
rev = "01cf9c60bff0f35567d876db7be7fb86032b44eb";
sha256 = "0mhmr1912z5nyfpcvhnlgb3v67a5n7i2n9l5abi05sfqffqssi79";
};
sourceRoot = "source/example/unpfs";
cargoSha256 = "13mk86d8ql2196039qb7z0rx4svwffw1mzpiyxp35gg5fhcphriq";
RUSTC_BOOTSTRAP = 1;
postInstall = ''
install -D -m 0444 ../../README* -t "$out/share/doc/${pname}"
install -D -m 0444 ../../LICEN* -t "$out/share/doc/${pname}"
'';
meta = with lib; {
description = "9P2000.L server implementation in Rust";
homepage = "https://github.com/pfpacket/rust-9p";
license = licenses.bsd3;
maintainers = with maintainers; [ raskin ];
# macOS build fails: https://github.com/pfpacket/rust-9p/issues/7
platforms = with platforms; linux;
};
}