nixos/uptime-kuma: Add additional lockdown settings to systemd unit (#361452)
[NixPkgs.git] / pkgs / by-name / fc / fcp / package.nix
blobe2ca5ee7af93e653d3bc1eeb19ab47cc8a7f9c94
2   expect,
3   fetchFromGitHub,
4   lib,
5   rustPlatform,
6   stdenv,
7   fetchpatch,
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "fcp";
12   version = "0.2.1";
14   src = fetchFromGitHub {
15     owner = "svetlitski";
16     repo = "fcp";
17     rev = "refs/tags/v${version}";
18     sha256 = "0f242n8w88rikg1srimdifadhggrb2r1z0g65id60ahb4bjm8a0x";
19   };
21   cargoPatches = [
22     (fetchpatch {
23       url = "https://github.com/Svetlitski/fcp/commit/1988f88be54a507b804b037cb3887fecf11bb571.patch";
24       hash = "sha256-fafpy1tviT1rV+jv1Yxg6xEsFZ9qXWQi5LykagDA5xI=";
25     })
26     (fetchpatch {
27       url = "https://github.com/Svetlitski/fcp/commit/89bcfc9aa1055dcf541da7a6477ffd3107023f48.patch";
28       hash = "sha256-NJ9MMeWf6Ywu+p5uDSWWpAcb01PoMbuSAZ3Qxl9jEaY=";
29     })
30     ./0001-update-Cargo.lock.patch
31   ];
33   cargoHash = "sha256-wFXvaARflHsT1xz3muC/BPRmhnXEEIk2pBsu87E7Wo8=";
35   nativeBuildInputs = [ expect ];
37   # character_device fails with "File name too long" on darwin
38   doCheck = !stdenv.hostPlatform.isDarwin;
40   postPatch = ''
41     patchShebangs tests/*.exp
42   '';
44   meta = {
45     description = "Significantly faster alternative to the classic Unix cp(1) command";
46     homepage = "https://github.com/svetlitski/fcp";
47     changelog = "https://github.com/svetlitski/fcp/releases/tag/v${version}";
48     license = lib.licenses.bsd3;
49     platforms = lib.platforms.unix;
50     maintainers = with lib.maintainers; [ figsoda ];
51     mainProgram = "fcp";
52   };