diff --git a/cargo.nix b/cargo.nix new file mode 100644 index 0000000..3d9f511 --- /dev/null +++ b/cargo.nix @@ -0,0 +1,541 @@ +# This file was @generated by cargo2nix 0.11.0. +# It is not intended to be manually edited. + +args@{ + release ? true, + rootFeatures ? [ + "qml-minimal/default" + ], + rustPackages, + buildRustPackages, + hostPlatform, + hostPlatformCpu ? null, + hostPlatformFeatures ? [], + target ? null, + codegenOpts ? null, + profileOpts ? null, + rustcLinkFlags ? null, + rustcBuildFlags ? null, + mkRustCrate, + rustLib, + lib, + workspaceSrc, +}: +let + workspaceSrc = if args.workspaceSrc == null then ./. else args.workspaceSrc; +in let + inherit (rustLib) fetchCratesIo fetchCrateLocal fetchCrateGit fetchCrateAlternativeRegistry expandFeatures decideProfile genDrvsByProfile; + profilesByName = { + }; + rootFeatures' = expandFeatures rootFeatures; + overridableMkRustCrate = f: + let + drvs = genDrvsByProfile profilesByName ({ profile, profileName }: mkRustCrate ({ inherit release profile hostPlatformCpu hostPlatformFeatures target profileOpts codegenOpts rustcLinkFlags rustcBuildFlags; } // (f profileName))); + in { compileMode ? null, profileName ? decideProfile compileMode release }: + let drv = drvs.${profileName}; in if compileMode == null then drv else drv.override { inherit compileMode; }; +in +{ + cargo2nixVersion = "0.11.0"; + workspace = { + qml-minimal = rustPackages.unknown.qml-minimal."0.1.0"; + }; + "registry+https://github.com/rust-lang/crates.io-index".cc."1.0.77" = overridableMkRustCrate (profileName: rec { + name = "cc"; + version = "1.0.77"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"; }; + features = builtins.concatLists [ + [ "jobserver" ] + [ "parallel" ] + ]; + dependencies = { + jobserver = rustPackages."registry+https://github.com/rust-lang/crates.io-index".jobserver."0.1.25" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".clang-format."0.1.2" = overridableMkRustCrate (profileName: rec { + name = "clang-format"; + version = "0.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "486ab3d84d57c53ad2cfbc8964731bc26e92711aad57396d06550d01fd3a123e"; }; + dependencies = { + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.16.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".codespan-reporting."0.11.1" = overridableMkRustCrate (profileName: rec { + name = "codespan-reporting"; + version = "0.11.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"; }; + dependencies = { + termcolor = rustPackages."registry+https://github.com/rust-lang/crates.io-index".termcolor."1.1.3" { inherit profileName; }; + unicode_width = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-width."0.1.10" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".convert_case."0.6.0" = overridableMkRustCrate (profileName: rec { + name = "convert_case"; + version = "0.6.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"; }; + dependencies = { + unicode_segmentation = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.10.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxx."1.0.83" = overridableMkRustCrate (profileName: rec { + name = "cxx"; + version = "1.0.83"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + dependencies = { + cxxbridge_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cxxbridge-macro."1.0.83" { profileName = "__noProfile"; }; + link_cplusplus = rustPackages."registry+https://github.com/rust-lang/crates.io-index".link-cplusplus."1.0.7" { inherit profileName; }; + }; + buildDependencies = { + cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.77" { profileName = "__noProfile"; }; + cxxbridge_flags = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cxxbridge-flags."1.0.83" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxx-build."1.0.83" = overridableMkRustCrate (profileName: rec { + name = "cxx-build"; + version = "1.0.83"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39"; }; + features = builtins.concatLists [ + [ "parallel" ] + ]; + dependencies = { + cc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.77" { inherit profileName; }; + codespan_reporting = rustPackages."registry+https://github.com/rust-lang/crates.io-index".codespan-reporting."0.11.1" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.16.0" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; + scratch = rustPackages."registry+https://github.com/rust-lang/crates.io-index".scratch."1.0.2" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.105" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxx-gen."0.7.83" = overridableMkRustCrate (profileName: rec { + name = "cxx-gen"; + version = "0.7.83"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "79ee482f08a625160786c0282ba4266e0ea649a34ea617081994ec7984aba137"; }; + dependencies = { + codespan_reporting = rustPackages."registry+https://github.com/rust-lang/crates.io-index".codespan-reporting."0.11.1" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.105" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxx-qt."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "cxx-qt"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "73020d52e6c40820c46b81bbbe873f5d2dd1607271844c466255058831189d98"; }; + dependencies = { + cxx_qt_gen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-qt-gen."0.4.1" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.105" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxx-qt-build."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "cxx-qt-build"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "57ebd436cecf49c16288288e58f97092e161543360515e6ecce99f2a70e6531a"; }; + dependencies = { + cc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.77" { inherit profileName; }; + convert_case = rustPackages."registry+https://github.com/rust-lang/crates.io-index".convert_case."0.6.0" { inherit profileName; }; + cxx_gen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-gen."0.7.83" { inherit profileName; }; + cxx_qt_gen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-qt-gen."0.4.1" { inherit profileName; }; + cxx_qt_lib_headers = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-qt-lib-headers."0.4.1" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + qt_build_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".qt-build-utils."0.4.1" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxx-qt-gen."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "cxx-qt-gen"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3354788c8c719c708c8793d84954e938394d1af7ae26ae2b74950f9823545346"; }; + dependencies = { + clang_format = rustPackages."registry+https://github.com/rust-lang/crates.io-index".clang-format."0.1.2" { inherit profileName; }; + convert_case = rustPackages."registry+https://github.com/rust-lang/crates.io-index".convert_case."0.6.0" { inherit profileName; }; + indoc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".indoc."1.0.7" { profileName = "__noProfile"; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.105" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxx-qt-lib."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "cxx-qt-lib"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2467d707cbe665bc5ac2617688a4c06bd2529c495352d212ddf5229a7a58bbca"; }; + dependencies = { + cxx = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx."1.0.83" { inherit profileName; }; + }; + buildDependencies = { + cxx_build = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-build."1.0.83" { profileName = "__noProfile"; }; + cxx_qt_lib_headers = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-qt-lib-headers."0.4.1" { profileName = "__noProfile"; }; + qt_build_utils = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".qt-build-utils."0.4.1" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxx-qt-lib-headers."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "cxx-qt-lib-headers"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e74805ac9bd18d2907d158aa2696033c22a209146941bc3142df190d65a31414"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxxbridge-flags."1.0.83" = overridableMkRustCrate (profileName: rec { + name = "cxxbridge-flags"; + version = "1.0.83"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cxxbridge-macro."1.0.83" = overridableMkRustCrate (profileName: rec { + name = "cxxbridge-macro"; + version = "1.0.83"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6"; }; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.105" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".either."1.8.0" = overridableMkRustCrate (profileName: rec { + name = "either"; + version = "1.8.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"; }; + features = builtins.concatLists [ + [ "use_std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".indoc."1.0.7" = overridableMkRustCrate (profileName: rec { + name = "indoc"; + version = "1.0.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "adab1eaa3408fb7f0c777a73e7465fd5656136fc93b670eb6df3c88c2c1344e3"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.5" = overridableMkRustCrate (profileName: rec { + name = "itertools"; + version = "0.10.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"; }; + features = builtins.concatLists [ + [ "default" ] + [ "use_alloc" ] + [ "use_std" ] + ]; + dependencies = { + either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.8.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".jobserver."0.1.25" = overridableMkRustCrate (profileName: rec { + name = "jobserver"; + version = "0.1.25"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b"; }; + dependencies = { + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.138" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".libc."0.2.138" = overridableMkRustCrate (profileName: rec { + name = "libc"; + version = "0.2.138"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".link-cplusplus."1.0.7" = overridableMkRustCrate (profileName: rec { + name = "link-cplusplus"; + version = "1.0.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + buildDependencies = { + cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.77" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" = overridableMkRustCrate (profileName: rec { + name = "memchr"; + version = "2.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".minimal-lexical."0.2.1" = overridableMkRustCrate (profileName: rec { + name = "minimal-lexical"; + version = "0.2.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".nom."7.1.1" = overridableMkRustCrate (profileName: rec { + name = "nom"; + version = "7.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + dependencies = { + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; + minimal_lexical = rustPackages."registry+https://github.com/rust-lang/crates.io-index".minimal-lexical."0.2.1" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".once_cell."1.16.0" = overridableMkRustCrate (profileName: rec { + name = "once_cell"; + version = "1.16.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "race" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" = overridableMkRustCrate (profileName: rec { + name = "proc-macro2"; + version = "1.0.47"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"; }; + features = builtins.concatLists [ + [ "default" ] + [ "proc-macro" ] + [ "span-locations" ] + ]; + dependencies = { + unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.5" { inherit profileName; }; + }; + }); + + "unknown".qml-minimal."0.1.0" = overridableMkRustCrate (profileName: rec { + name = "qml-minimal"; + version = "0.1.0"; + registry = "unknown"; + src = fetchCrateLocal workspaceSrc; + dependencies = { + cxx = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx."1.0.83" { inherit profileName; }; + cxx_qt = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-qt."0.4.1" { profileName = "__noProfile"; }; + cxx_qt_lib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-qt-lib."0.4.1" { inherit profileName; }; + }; + buildDependencies = { + cxx_qt_build = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cxx-qt-build."0.4.1" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".qt-build-utils."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "qt-build-utils"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "44058bc241aeb84485cfb90e0f6ba28e12db0ed0f5b6eadb1853cf0ea68e21eb"; }; + dependencies = { + thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.37" { inherit profileName; }; + versions = rustPackages."registry+https://github.com/rust-lang/crates.io-index".versions."4.1.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" = overridableMkRustCrate (profileName: rec { + name = "quote"; + version = "1.0.21"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"; }; + features = builtins.concatLists [ + [ "default" ] + [ "proc-macro" ] + ]; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".scratch."1.0.2" = overridableMkRustCrate (profileName: rec { + name = "scratch"; + version = "1.0.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".syn."1.0.105" = overridableMkRustCrate (profileName: rec { + name = "syn"; + version = "1.0.105"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"; }; + features = builtins.concatLists [ + [ "clone-impls" ] + [ "default" ] + [ "derive" ] + [ "extra-traits" ] + [ "full" ] + [ "parsing" ] + [ "printing" ] + [ "proc-macro" ] + [ "quote" ] + ]; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; + unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.5" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".termcolor."1.1.3" = overridableMkRustCrate (profileName: rec { + name = "termcolor"; + version = "1.1.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"; }; + dependencies = { + ${ if hostPlatform.isWindows then "winapi_util" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.5" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.37" = overridableMkRustCrate (profileName: rec { + name = "thiserror"; + version = "1.0.37"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"; }; + dependencies = { + thiserror_impl = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.37" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.37" = overridableMkRustCrate (profileName: rec { + name = "thiserror-impl"; + version = "1.0.37"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"; }; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.47" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.105" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.5" = overridableMkRustCrate (profileName: rec { + name = "unicode-ident"; + version = "1.0.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.10.0" = overridableMkRustCrate (profileName: rec { + name = "unicode-segmentation"; + version = "1.10.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-width."0.1.10" = overridableMkRustCrate (profileName: rec { + name = "unicode-width"; + version = "0.1.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".versions."4.1.0" = overridableMkRustCrate (profileName: rec { + name = "versions"; + version = "4.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ee97e1d97bd593fb513912a07691b742361b3dd64ad56f2c694ea2dbfe0665d3"; }; + dependencies = { + itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.5" { inherit profileName; }; + nom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."7.1.1" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" = overridableMkRustCrate (profileName: rec { + name = "winapi"; + version = "0.3.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"; }; + features = builtins.concatLists [ + [ "consoleapi" ] + [ "errhandlingapi" ] + [ "fileapi" ] + [ "minwindef" ] + [ "processenv" ] + [ "std" ] + [ "winbase" ] + [ "wincon" ] + [ "winerror" ] + [ "winnt" ] + ]; + dependencies = { + ${ if hostPlatform.config == "i686-pc-windows-gnu" then "winapi_i686_pc_windows_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" { inherit profileName; }; + ${ if hostPlatform.config == "x86_64-pc-windows-gnu" then "winapi_x86_64_pc_windows_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" = overridableMkRustCrate (profileName: rec { + name = "winapi-i686-pc-windows-gnu"; + version = "0.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.5" = overridableMkRustCrate (profileName: rec { + name = "winapi-util"; + version = "0.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"; }; + dependencies = { + ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" = overridableMkRustCrate (profileName: rec { + name = "winapi-x86_64-pc-windows-gnu"; + version = "0.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"; }; + }); + +} diff --git a/default.nix b/default.nix index beeb316..113f8cc 100644 --- a/default.nix +++ b/default.nix @@ -3,12 +3,6 @@ { stdenv, lib, - # kglobalaccel, - # kinit, - # kwin, - # kio, - # kguiaddons, - # kcoreaddons, gcc, gnumake, clang, @@ -16,18 +10,24 @@ extra-cmake-modules, pkg-config, wrapQtAppsHook, + makeWrapper, qtbase, - qt5Full, clang-tools, qttools, qtquickcontrols2, qtx11extras, qtmultimedia, + qtwayland, karchive, kirigami2, ki18n, kcoreaddons, - # lightly-qt, + # kglobalaccel, + # kinit, + # kwin, + # kio, + # kguiaddons, + # kcoreaddons, podofo, mpv, # Rust tools @@ -55,6 +55,10 @@ stdenv.mkDerivation rec { extra-cmake-modules pkg-config wrapQtAppsHook + rustc + cargo + corrosion + makeWrapper # gccStdenv # stdenv ]; @@ -65,29 +69,21 @@ stdenv.mkDerivation rec { qtquickcontrols2 qtx11extras qtmultimedia - # qtwayland + qtwayland kirigami2 - # breeze-icons - # breeze-qt5 - # qqc2-desktop-style karchive ki18n kcoreaddons - # lightly-qt podofo mpv # libsForQt5.kconfig - # ffmpeg-full - # yt-dlp # Rust tools clippy - rustc - cargo rustfmt rust-analyzer - corrosion ]; + RUST_BACKTRACE = 1; # preConfigure = '' # # local modulepath=$(kf5-config --install module) # # local datapath=$(kf5-config --install data) @@ -117,7 +113,6 @@ stdenv.mkDerivation rec { rm -rf ~/.cache/librepresenter/Libre\ Presenter/qmlcache/ ''; - RUST_BACKTRACE = 1; meta = with lib; { name = "Libre Presenter"; description = "A church presentation software made with QT/QML"; diff --git a/flake.lock b/flake.lock index 6aad4dc..bbe4a3a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,59 @@ { "nodes": { + "cargo2nix": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1655189312, + "narHash": "sha256-gpJ57OgIebUpO+7F00VltxSEy6dz2x6HeJ5BcRM8rDA=", + "owner": "cargo2nix", + "repo": "cargo2nix", + "rev": "c149357cc3d17f2849c73eb7a09d07a307cdcfe8", + "type": "github" + }, + "original": { + "owner": "cargo2nix", + "ref": "release-0.11.0", + "repo": "cargo2nix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "locked": { "lastModified": 1667395993, "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", @@ -17,11 +70,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1670332253, - "narHash": "sha256-O5SmhlIUt1s+vK4NXeGYqwcBIMwbBPAEZ3GHE3XT28c=", + "lastModified": 1654275867, + "narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1c9ffcf70786f0966982ce0fc76ec05df2e1dec2", + "rev": "7a20c208aacf4964c19186dcad51f89165dc7ed0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1670507980, + "narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2787fc7d1e51404678614bf0fe92fc296746eec0", "type": "github" }, "original": { @@ -33,8 +102,34 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "cargo2nix": "cargo2nix", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "cargo2nix", + "flake-utils" + ], + "nixpkgs": [ + "cargo2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1653878966, + "narHash": "sha256-T51Gck/vrJZi1m+uTbhEFTRgZmE59sydVONadADv358=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "8526d618af012a923ca116be9603e818b502a8db", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index ca2798a..5ee355b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,20 +2,31 @@ description = "A Church Presentation Application"; inputs = { + cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = inputs: with inputs; flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + overlays = [cargo2nix.overlays.default]; + }; src = ./.; - in + rustPkgs = pkgs.rustBuilder.makePackageSet { + rustVersion = "1.61.0"; + packageFun = import ./Cargo.nix; + }; + + in rec { - devShell = import ./shell.nix { inherit pkgs; }; - defaultPackage = pkgs.libsForQt5.callPackage ./default.nix {}; + libre-presenter = (rustPkgs.workspace.libre-presenter {}).bin; + + devShell = import ./shell.nix { inherit pkgs; }; + defaultPackage = pkgs.libsForQt5.callPackage ./default.nix {}; } ); }