Skip to content

Commit

Permalink
flake update
Browse files Browse the repository at this point in the history
  • Loading branch information
ominit committed Jan 8, 2025
1 parent 998d665 commit f95d130
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/githubpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
nix_path: nixpkgs=channel:nixos-unstable
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Build
run: nix-build && nix-shell --run "dx build --release --platform web"
run: nix develop --command bash -c "dx build --release --platform web"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ edition = "2021"
anyhow = "1.0.95"
chrono = { version = "0.4.39", features = ["serde"] }
dioxus = { version = "0.6.1" }
ewebsock = { git = "https://github.com/c-git/ewebsock/", branch = "wss_support", features = ["tls", "rustls_ring"], optional = true }
ewebsock = { git = "https://github.com/c-git/ewebsock/", branch = "wss_support", features = [
"tls",
"rustls_ring",
], optional = true }
flate2 = "1.0.35"
futures = "0.3.31"
js-sys = { version = "0.3.76", optional = true }
Expand All @@ -33,7 +36,7 @@ web-sys = { version = "0.3.76", features = [
whoami = "1.5.2"

[features]
default = ["web"]
default = ["desktop"]
web = ["dioxus/web", "dep:web-sys", "dep:wasm-bindgen", "dep:js-sys"]
desktop = ["dioxus/desktop", "dep:ewebsock"]
# mobile = ["dioxus/mobile"]
Expand Down
28 changes: 23 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
...
}:
flake-utils.lib.eachDefaultSystem (system: let
lib = nixpkgs.lib;
pkgs = import nixpkgs {
inherit system;
overlays = [(import rust-overlay)];
Expand All @@ -32,15 +33,29 @@
];

buildInputs = with pkgs; [
at-spi2-atk
atkmm
cairo
gdk-pixbuf
glib
gtk3
harfbuzz
librsvg
libsoup_3
pango
webkitgtk_4_1
openssl
wayland
libxkbcommon
libGL
];

discidium = craneLib.buildPackage {
name = "discidium";
src = craneLib.cleanCargoSource ./.;
src = lib.cleanSourceWith {
src = self;
filter = path: type:
(lib.hasSuffix "\.html" path)
|| (lib.hasInfix "/assets/" path)
|| (craneLib.filterCargoSources path type);
};
inherit buildInputs nativeBuildInputs;

postInstall = ''
Expand All @@ -55,8 +70,11 @@
};

devShell = pkgs.mkShell {
inherit nativeBuildInputs buildInputs;
# inherit buildInputs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
packages = with pkgs; [
dioxus-cli
];
# RUST_BACKTRACE = 1;
};
});
Expand Down

0 comments on commit f95d130

Please sign in to comment.