From 812dde842c25183a482a98e02eeca724a5d24320 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 22 Aug 2024 13:58:47 +0200 Subject: build(package): Include python `blake3` dependency --- package/blake3/blake3.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 package/blake3/blake3.nix (limited to 'package/blake3/blake3.nix') diff --git a/package/blake3/blake3.nix b/package/blake3/blake3.nix new file mode 100644 index 0000000..70c556f --- /dev/null +++ b/package/blake3/blake3.nix @@ -0,0 +1,30 @@ +{ + lib, + python3Packages, + rustPlatform, + fetchFromGitHub, +}: +python3Packages.buildPythonPackage rec { + pname = "blake3"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = "oconnor663"; + repo = "blake3-py"; + rev = version; + hash = "sha256-Ju40ea8IQMOPg9BiN47BMmr/WU8HptbqqzVI+jNGpA8="; + }; + + patches = [ + ./add_cargo_lock.patch + ]; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src patches; + hash = "sha256-GwyGSdmJTgsHWfcS2n2FCFrlwRcuANM8/WteYTTyY6o="; + }; + + format = "pyproject"; + + nativeBuildInputs = with rustPlatform; [cargoSetupHook maturinBuildHook]; +} -- cgit 1.4.1