Skip to content

Commit

Permalink
fix(build): compile w/o nix again
Browse files Browse the repository at this point in the history
  • Loading branch information
youwen5 committed Nov 17, 2024
1 parent 0d4159e commit ac095ce
Show file tree
Hide file tree
Showing 7 changed files with 1,136 additions and 927 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ client/public/static/external-apps/*
target

result

stats.html
splashscreen.html
4 changes: 2 additions & 2 deletions client/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
cargo-tauri,
pkg-config,
gtk4,
webkitgtk_4_0,
webkitgtk_4_1,
libsoup,
wrapGAppsHook4,
splashscreen,
Expand Down Expand Up @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
[
splashscreen
]
++ lib.optional stdenv.targetPlatform.isLinux webkitgtk_4_0
++ lib.optional stdenv.targetPlatform.isLinux webkitgtk_4_1
++ lib.optional stdenv.targetPlatform.isLinux gst_all_1.gstreamer
++ lib.optional stdenv.targetPlatform.isLinux gst_all_1.gst-plugins-good
++ lib.optional stdenv.targetPlatform.isLinux gst_all_1.gst-plugins-base
Expand Down
5 changes: 3 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"build": "pnpm run build-splash && vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"tauri": "tauri"
"tauri": "tauri",
"build-splash": "cd ../splash-screen && pnpm install && pnpm build && cp dist/index.html ../client/public/splashscreen.html"
},
"devDependencies": {
"@svelte-plugins/tooltips": "^3.0.0",
Expand Down
28 changes: 14 additions & 14 deletions client/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,40 @@
pkgs,
...
}:
{
rec {
packages = rec {
default = jankboard;
jankboard = pkgs.callPackage ./client { inherit splashscreen; };
splashscreen = pkgs.callPackage ./splash-screen { };
};
devShells.default =
let
libraries = with pkgs; [
gtk3
cairo
gdk-pixbuf
glib
dbus
openssl_3
librsvg
];
in
pkgs.mkShell {
# import dependencies from packages
inputsFrom = pkgs.lib.attrsToList packages;

# additional build inputs required for various rust crates
buildInputs = with pkgs; [
curl
wget
];

shellHook = ''
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk4}/share/gsettings-schemas/${pkgs.gtk4.name}:$XDG_DATA_DIRS
'';
};

};
};
}
Loading

0 comments on commit ac095ce

Please sign in to comment.