Update dioxus cli
This commit is contained in:
parent
4bb851db89
commit
c36ce14b3b
2 changed files with 43 additions and 48 deletions
38
flake.nix
38
flake.nix
|
|
@ -8,10 +8,6 @@
|
|||
url = "github:thedodd/trunk";
|
||||
flake = false;
|
||||
};
|
||||
inputs.dioxus = {
|
||||
url = "github:DioxusLabs/dioxus";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
|
|
@ -20,7 +16,6 @@
|
|||
naersk,
|
||||
rust-overlay,
|
||||
trunk,
|
||||
dioxus,
|
||||
}:
|
||||
(flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
|
|
@ -34,16 +29,11 @@
|
|||
cargo = rust;
|
||||
rustc = rust;
|
||||
};
|
||||
dioxus-cli = naersk'.buildPackage {
|
||||
src = "${dioxus}/packages/cli";
|
||||
buildInputs = [pkgs.openssl];
|
||||
nativeBuildInputs = [pkgs.pkg-config];
|
||||
};
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
rust
|
||||
dioxus-cli
|
||||
self.packages.${system}.dioxus
|
||||
(naersk'.buildPackage trunk)
|
||||
pkgs.httpie
|
||||
pkgs.sea-orm-cli
|
||||
|
|
@ -53,6 +43,28 @@
|
|||
};
|
||||
|
||||
packages = {
|
||||
dioxus = pkgs.callPackage ({
|
||||
rustPlatform,
|
||||
pkg-config,
|
||||
cacert,
|
||||
openssl,
|
||||
coreutils-full,
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "dioxus-cli";
|
||||
version = "0.4.0";
|
||||
src = pkgs.fetchCrate {
|
||||
inherit version pname;
|
||||
hash = "sha256-4BIuD/rrA398hPEoNt5PwWylPAR0fA1UKc90xyH5Fd0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [pkg-config cacert coreutils-full];
|
||||
buildInputs = [openssl];
|
||||
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
|
||||
cargoHash = "sha256-ok+fjvwz4k0/M5j7wut2A2AK6tuO3UfZtgoCXaCaHXY=";
|
||||
}) {};
|
||||
server = naersk'.buildPackage ./.;
|
||||
frontend = let
|
||||
pkg = {
|
||||
|
|
@ -94,7 +106,7 @@
|
|||
REGALADE_FRONTEND_DOMAIN = frontendRoot;
|
||||
|
||||
nativeBuildInputs = [
|
||||
dioxus-cli
|
||||
self.packages.${system}.dioxus
|
||||
wasm-bindgen-cli
|
||||
rustPlatformWasm.cargoSetupHook
|
||||
rustPlatformWasm.cargoBuildHook
|
||||
|
|
@ -107,7 +119,7 @@
|
|||
mkdir -p $XDG_DATA_HOME
|
||||
|
||||
cd app
|
||||
dioxus build --release
|
||||
dx build --release
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue