How to set up Rust project with PyO3 in NixOS?

I am trying to set up a project that uses Python with Rust in NixOS, the project can be cloned here:

And when I run cargo build, I got the following error:

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.1fkl6j3yk4ei3wnu.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.1lb7mfu9dys9izmc.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.1mpu693mjwjlisud.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.1nvi9be7kc54rm2o.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.1qqkp02tif8c3dcy.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.1tqlnavn8i62urtj.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.219oncphwpaf4xmg.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.296bhgefy7kvor22.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.297tlfllcziy0i4w.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.2cqhxubo8g4v6a5z.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.2syz6ebj0bklikj4.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.2xdpxvy5r4t47g6t.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.31nh1qd9u2kq8jdc.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.32dzhnjotnb7e8h5.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.32y8a8s7rnj6mfkh.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.33txxiequxt52kkh.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.3s87ghyn2jtisxpc.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.47k7vztar6154k6t.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.49v6r62bjpkrrtkl.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.4auvzhk9xptyj92j.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.4lvn8ijyfdw40dbu.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.4lvoeqb2tzn0lp0.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.4m3mmz3716d7hlq8.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.4vlgwy787pr73mwg.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.9fvz3v6h8j2wsby.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.qv7uyfgtu97d6bz.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.sbtv8o91b4x5m3q.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.texm6xa1fqwm4q9.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.tezgklbizh7yxtl.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.tvysp3mc6new0m4.rcgu.o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.3iponzg2tv2bhyvv.rcgu.o" "-Wl,--as-needed" "-L" "/home/hugosum/jyutping-converter/target/debug/deps" "-L" "/nix/store/afb70kwrz3ncwpv7bxlvaz3yryxcsh4w-rust-default-1.60.0-nightly-2022-01-11/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libparking_lot-ce48cd0d0d61d8e0.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libparking_lot_core-740e98b11f4a5244.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libsmallvec-1fbe5b6a2871d455.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/liblock_api-cd3b85c2abaca44b.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libscopeguard-ff2bb1f39834214d.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libinstant-e762c784f8da740e.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libcfg_if-90e3626e3c41eec3.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/liblibc-afd8afe3a059e1c8.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libunindent-f7b6621e65d5961f.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libpaste-14e5d71bc7f866d7.rlib" "/home/hugosum/jyutping-converter/target/debug/deps/libindoc-4ca413157e2aeb0c.rlib" "-Wl,--start-group" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-c46e4336da0ba77b.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-9cb5ef8235cf10de.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-c94e3d0069d19330.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-5a532766d1e80b5b.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-d08f0c83526179dc.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-d995c6cafdb3d253.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-02ebc04a72bd9433.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-5cbc32ae14534ca9.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-969ebc8623abfcc9.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-7f98f837d3579544.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-b96a8aea2dd7bf12.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-c7b2792f3bc0d0eb.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-7558dde8464d46ce.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b3d84848ab790cf7.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-f48e57d6d73020ee.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-ffaac76756e3f83b.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2a6a2797f7a73818.rlib" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0e3656b1fda5fd7b.rlib" "-Wl,--end-group" "/nix/store/g1k5rdwsl216vagsyfynnbgfx1r2kngj-rust-std-1.60.0-nightly-2022-01-11-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-f98cce041f593917.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/nix/store/afb70kwrz3ncwpv7bxlvaz3yryxcsh4w-rust-default-1.60.0-nightly-2022-01-11/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.1nvi9be7kc54rm2o.rcgu.o: in function `pyo3::types::dict::PyDict::set_item::{{closure}}::{{closure}}':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/dict.rs:124: undefined reference to `PyDict_SetItem'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/jyutping_converter-777c9db762cea107.tezgklbizh7yxtl.rcgu.o: in function `pyo3::ffi::object::Py_DECREF':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/ffi/object.rs:403: undefined reference to `_Py_Dealloc'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.11.rcgu.o): in function `pyo3::types::module::PyModule::import':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/module.rs:72: undefined reference to `PyImport_Import'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.12.rcgu.o): in function `pyo3::ffi::object::Py_DECREF':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/ffi/object.rs:403: undefined reference to `_Py_Dealloc'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.12.rcgu.o): in function `pyo3::ffi::object::PyType_HasFeature':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/ffi/object.rs:512: undefined reference to `PyType_GetFlags'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.15.rcgu.o): in function `pyo3::python::Python::run_code':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/python.rs:479: undefined reference to `PyImport_AddModule'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/python.rs:489: undefined reference to `Py_CompileString'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/python.rs:493: undefined reference to `PyEval_EvalCode'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.15.rcgu.o): in function `pyo3::python::Python::run_code::{{closure}}':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/python.rs:486: undefined reference to `PyModule_GetDict'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.15.rcgu.o): in function `pyo3::types::dict::PyDict::new':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/dict.rs:31: undefined reference to `PyDict_New'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.3.rcgu.o): in function `pyo3::types::any::PyAny::getattr::{{closure}}':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/any.rs:111: undefined reference to `PyObject_GetAttr'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.3.rcgu.o): in function `pyo3::types::any::PyAny::repr':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/any.rs:622: undefined reference to `PyObject_Repr'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.5.rcgu.o): in function `pyo3::gil::prepare_freethreaded_python::{{closure}}':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/gil.rs:97: undefined reference to `Py_IsInitialized'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/gil.rs:99: undefined reference to `Py_InitializeEx'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/gil.rs:102: undefined reference to `PyEval_SaveThread'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.5.rcgu.o): in function `pyo3::gil::GILGuard::acquire_unchecked':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/gil.rs:254: undefined reference to `PyGILState_Ensure'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.5.rcgu.o): in function `<pyo3::gil::GILGuard as core::ops::drop::Drop>::drop':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/gil.rs:300: undefined reference to `PyGILState_Release'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.5.rcgu.o): in function `pyo3::types::bytes::PyBytes::as_bytes':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/bytes.rs:92: undefined reference to `PyBytes_AsString'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/bytes.rs:93: undefined reference to `PyBytes_Size'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.7.rcgu.o): in function `pyo3::types::string::PyString::new':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/string.rs:144: undefined reference to `PyUnicode_FromStringAndSize'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.7.rcgu.o): in function `pyo3::types::string::PyString::to_str':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/string.rs:180: undefined reference to `PyUnicode_AsUTF8String'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.7.rcgu.o): in function `pyo3::types::string::PyString::to_string_lossy':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/types/string.rs:199: undefined reference to `PyUnicode_AsEncodedString'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.9.rcgu.o): in function `pyo3::err::PyErr::take':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/err/mod.rs:231: undefined reference to `PyErr_Fetch'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/err/mod.rs:271: undefined reference to `PyErr_Restore'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/err/mod.rs:272: undefined reference to `PyErr_PrintEx'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.9.rcgu.o): in function `pyo3::err::PyErr::new_type':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/err/mod.rs:334: undefined reference to `PyErr_NewException'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.9.rcgu.o): in function `pyo3::err::PyErr::normalized':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/err/mod.rs:495: undefined reference to `PyErr_NormalizeException'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.9.rcgu.o): in function `pyo3::err::panic_after_error':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/err/mod.rs:580: undefined reference to `PyErr_Print'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.0.rcgu.o): in function `<pyo3::exceptions::PyBaseException as pyo3::type_object::PyTypeInfo>::type_object_raw':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/exceptions.rs:307: undefined reference to `PyExc_BaseException'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.0.rcgu.o): in function `<pyo3::exceptions::PyTypeError as pyo3::type_object::PyTypeInfo>::type_object_raw':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/exceptions.rs:414: undefined reference to `PyExc_TypeError'
          /nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin/ld: /home/hugosum/jyutping-converter/target/debug/deps/libpyo3-02cfcef55cbdd22d.rlib(pyo3-02cfcef55cbdd22d.pyo3.5d99432e-cgu.0.rcgu.o): in function `<pyo3::exceptions::PyValueError as pyo3::type_object::PyTypeInfo>::type_object_raw':
          /home/hugosum/.cache/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/exceptions.rs:442: undefined reference to `PyExc_ValueError'
          collect2: error: ld returned 1 exit status

  = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

I am pretty sure it is related how NixOS handle shared library, but how can I fix this issue?

Hosted by Flying Circus.