appflowy: browser login redirect (#376016)
[NixPkgs.git] / pkgs / by-name / ca / cached-nix-shell / package.nix
blob71256c2b1b5cbfcb46ce254bcd678c5464d6826d
2   fetchFromGitHub,
3   lib,
4   nix,
5   ronn,
6   rustPlatform,
7 }:
9 let
10   blake3-src = fetchFromGitHub {
11     owner = "BLAKE3-team";
12     repo = "BLAKE3";
13     rev = "refs/tags/1.5.1";
14     hash = "sha256-STWAnJjKrtb2Xyj6i1ACwxX/gTkQo5jUHilcqcgJYxc=";
15   };
17 rustPlatform.buildRustPackage rec {
18   pname = "cached-nix-shell";
19   version = "0.1.6";
21   src = fetchFromGitHub {
22     owner = "xzfc";
23     repo = "cached-nix-shell";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-LI/hecqeRg3eCzU2bASJA8VoG4nvrSeHSeaGYn7M/UI=";
26   };
28   cargoHash = "sha256-Jf0VRTGwdKxCwyb9hVKDQcdZsHHWaedrDbwq9MK1tn4=";
30   nativeBuildInputs = [
31     nix
32     ronn
33   ];
35   # The BLAKE3 C library is intended to be built by the project depending on it
36   # rather than as a standalone library.
37   # https://github.com/BLAKE3-team/BLAKE3/blob/0.3.1/c/README.md#building
38   env.BLAKE3_CSRC = "${blake3-src}/c";
40   postBuild = ''
41     make -f nix/Makefile post-build
42   '';
44   postInstall = ''
45     make -f nix/Makefile post-install
46   '';
48   meta = {
49     description = "Instant startup time for nix-shell";
50     mainProgram = "cached-nix-shell";
51     homepage = "https://github.com/xzfc/cached-nix-shell";
52     changelog = "https://github.com/xzfc/cached-nix-shell/releases/tag/v${version}";
53     license = with lib.licenses; [
54       unlicense
55       # or
56       mit
57     ];
58     maintainers = with lib.maintainers; [ xzfc ];
59     platforms = lib.platforms.linux ++ lib.platforms.darwin;
60   };