fuck dioxus

This commit is contained in:
Michael Zhang 2023-04-09 00:49:15 -05:00
parent b86e9c2f81
commit 589a9ce2fe
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
3 changed files with 52 additions and 4 deletions

View file

@ -23,7 +23,14 @@
prisma-env =
import ./nix/prisma-env.nix { inherit (pkgs) prisma-engines; };
toolchain = pkgs.fenix.default;
toolchain = with fenix.packages.${system};
combine [
minimal.rustc
minimal.cargo
targets.wasm32-unknown-unknown.latest.rust-std
];
dioxus-cli = pkgs.callPackage ./nix/dioxus-cli.nix { };
flakePkgs = rec {
mdbook-tera =
@ -41,6 +48,13 @@
cargo-flamegraph
cargo-watch
zlib
dioxus-cli
cargo-generate
pkg-config
rust-analyzer
deno
openssl
yq
@ -51,12 +65,24 @@
(python310.withPackages
(p: with p; [ ipython numpy scipy sympy ]))
pkgs.fenix.minimal.cargo
pkgs.fenix.minimal.rustc
toolchain
# Get the nightly version of rustfmt so we can wrap comments
pkgs.fenix.default.rustfmt
];
PKG_CONFIG_PATH = pkgs.lib.concatStringsSep ":" [
"${pkgs.gnome.libsoup.dev}/lib/pkgconfig"
"${pkgs.webkitgtk.dev}/lib/pkgconfig"
"${pkgs.gtk3.dev}/lib/pkgconfig"
"${pkgs.gtk4.dev}/lib/pkgconfig"
"${pkgs.glib.dev}/lib/pkgconfig"
"${pkgs.cairo.dev}/lib/pkgconfig"
"${pkgs.gdk-pixbuf.dev}/lib/pkgconfig"
"${pkgs.pango.dev}/lib/pkgconfig"
"${pkgs.harfbuzz.dev}/lib/pkgconfig"
"${pkgs.at-spi2-atk.dev}/lib/pkgconfig"
];
} // prisma-env);
ci = pkgs.mkShell { packages = with pkgs; [ bash mdbook nodejs ]; };

18
nix/dioxus-cli.nix Normal file
View file

@ -0,0 +1,18 @@
{ dioxus-cli, fetchCrate, lib }:
dioxus-cli.overrideAttrs (p: rec {
inherit (p) pname;
version = "0.3.1";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-01XFw3PCKw5C0enEascVqGDO6Qvq3gyFZBacrv0cK0U=";
};
cargoDeps = p.cargoDeps.overrideAttrs (_: {
inherit src;
outputHash = "sha256-mdU212QUeTU94JPQuwmnS6lpzfu+XRSIlpIkHUk5Ip0=";
});
doCheck = false;
})

View file

@ -1,6 +1,10 @@
{ lib, makeRustPlatform, toolchain, fetchFromGitHub }:
let rustPlatform = makeRustPlatform { inherit (toolchain) cargo rustc; };
let
rustPlatform = makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in rustPlatform.buildRustPackage rec {
name = "mdbook-tera";