13 { version, src, ... }:
16 rustDep = rustPlatform.buildRustPackage {
17 pname = "super_native_extensions-rs";
20 sourceRoot = "${src.name}/rust";
25 lockFile = ./Cargo-0.8.22.lock;
27 "mime_guess-2.0.4" = "sha256-KSw0YUTGqNEWY9pMvQplUGajJgoP2BRwVX6qZPpB2rI=";
30 _0_9_0-dev_3 = _0_8_22;
38 .${"_" + (lib.replaceStrings [ "." ] [ "_" ] version)} or (throw ''
39 Unsupported version of pub 'super_native_extensions': '${version}'
40 Please add ${src}/rust/Cargo.lock
41 to this path, and add corresponding entry here. If the lock
42 is the same with existing versions, add an alias here.
45 nativeBuildInputs = [ pkg-config ];
54 passthru.libraryPath = "lib/libsuper_native_extensions.so";
57 fakeCargokitCmake = writeText "FakeCargokit.cmake" ''
58 function(apply_cargokit target manifest_dir lib_name any_symbol_name)
59 target_link_libraries("''${target}" PRIVATE ${rustDep}/${rustDep.passthru.libraryPath})
60 set("''${target}_cargokit_lib" ${rustDep}/${rustDep.passthru.libraryPath} PARENT_SCOPE)
66 pname = "super_native_extensions";
68 inherit (src) passthru;
74 chmod +rwx $out/cargokit/cmake/cargokit.cmake
75 cp ${fakeCargokitCmake} $out/cargokit/cmake/cargokit.cmake