Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.4 KiB
Nix

{
fetchFromGitHub,
lib,
nix,
ronn,
rustPlatform,
}:
let
blake3-src = fetchFromGitHub {
owner = "BLAKE3-team";
repo = "BLAKE3";
rev = "refs/tags/1.5.1";
hash = "sha256-STWAnJjKrtb2Xyj6i1ACwxX/gTkQo5jUHilcqcgJYxc=";
};
in
rustPlatform.buildRustPackage rec {
pname = "cached-nix-shell";
version = "0.1.6";
src = fetchFromGitHub {
owner = "xzfc";
repo = "cached-nix-shell";
rev = "refs/tags/v${version}";
hash = "sha256-LI/hecqeRg3eCzU2bASJA8VoG4nvrSeHSeaGYn7M/UI=";
};
cargoHash = "sha256-Rl+PgNr29OAl6P/iUfkuFlQycyeYNmxUIIdigk7PgV4=";
nativeBuildInputs = [
nix
ronn
];
# The BLAKE3 C library is intended to be built by the project depending on it
# rather than as a standalone library.
# https://github.com/BLAKE3-team/BLAKE3/blob/0.3.1/c/README.md#building
env.BLAKE3_CSRC = "${blake3-src}/c";
postBuild = ''
make -f nix/Makefile post-build
'';
postInstall = ''
make -f nix/Makefile post-install
'';
meta = {
description = "Instant startup time for nix-shell";
mainProgram = "cached-nix-shell";
homepage = "https://github.com/xzfc/cached-nix-shell";
changelog = "https://github.com/xzfc/cached-nix-shell/releases/tag/v${version}";
license = with lib.licenses; [
unlicense
# or
mit
];
maintainers = with lib.maintainers; [ xzfc ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}