Compare commits

..

3 Commits

Author SHA1 Message Date
e95f335d76 Remove daisyui wrapper modules
Some checks failed
Push Workflows / test (push) Failing after 5s
Push Workflows / docs (push) Failing after 5s
Push Workflows / clippy (push) Failing after 6s
Push Workflows / rustfmt (push) Successful in 4s
Push Workflows / tailwind-build (push) Failing after 4s
Push Workflows / nix-build (push) Successful in 4m51s
Push Workflows / build (push) Failing after 1m15s
2026-08-04 20:12:39 -04:00
55db6c317c Use tailwindcss-with-pkgs flake 2026-08-04 20:12:00 -04:00
aff6b9a760 Use daisyui flake 2026-08-04 20:09:35 -04:00
5 changed files with 42 additions and 79 deletions

34
flake.lock generated
View File

@@ -1,5 +1,20 @@
{
"nodes": {
"daisyui": {
"locked": {
"lastModified": 1785801268,
"narHash": "sha256-dqE+kAW1Smsf+H1Yfzy6DbYHST/sWfz3Ghzw7M331k8=",
"ref": "refs/heads/main",
"rev": "fd3f4af492599cf639c4d5f52f9521f0054e5e9e",
"revCount": 3,
"type": "git",
"url": "https://git.mregirouard.com/nix/daisyui.git"
},
"original": {
"type": "git",
"url": "https://git.mregirouard.com/nix/daisyui.git"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@@ -36,9 +51,11 @@
},
"root": {
"inputs": {
"daisyui": "daisyui",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
"rust-overlay": "rust-overlay",
"tailwindcss-with-pkgs": "tailwindcss-with-pkgs"
}
},
"rust-overlay": {
@@ -75,6 +92,21 @@
"repo": "default",
"type": "github"
}
},
"tailwindcss-with-pkgs": {
"locked": {
"lastModified": 1785801205,
"narHash": "sha256-yfKa3/wK/m1Gwjc923Fvpa/k44MjQOOR3eUfjqLn+qI=",
"ref": "refs/heads/main",
"rev": "f28fd97c86f37a6078599338fa9c6a0327821b9d",
"revCount": 3,
"type": "git",
"url": "https://git.mregirouard.com/nix/tailwindcss-with-pkgs.git"
},
"original": {
"type": "git",
"url": "https://git.mregirouard.com/nix/tailwindcss-with-pkgs.git"
}
}
},
"root": "root",

View File

@@ -8,6 +8,10 @@
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
daisyui.url = "git+https://git.mregirouard.com/nix/daisyui.git";
tailwindcss-with-pkgs.url = "git+https://git.mregirouard.com/nix/tailwindcss-with-pkgs.git";
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }@inputs:
@@ -35,43 +39,11 @@
overlays = [
(import rust-overlay)
wasm-bindgen-overlay
inputs.daisyui.overlays.default
inputs.tailwindcss-with-pkgs.overlays.default
];
};
daisyui-version = "v5.5.23";
daisyui = pkgs.stdenvNoCC.mkDerivation {
name = "daisyui";
src = pkgs.fetchurl {
url = "https://github.com/saadeghi/daisyui/releases/download/${daisyui-version}/daisyui.js";
sha256 = "sha256-yu/8ebzKXMfrcHJw2FzcXNzwYOF1hC+nufrTaPOMWeA=";
};
unpackPhase = "true";
installPhase = ''
mkdir "$out"
cp "$src" "$out/daisyui.js"
'';
};
daisyui-theme = pkgs.stdenvNoCC.mkDerivation {
name = "daisyui-theme";
src = pkgs.fetchurl {
url = "https://github.com/saadeghi/daisyui/releases/download/${daisyui-version}/daisyui-theme.js";
sha256 = "sha256-p/ofznslFSKQ87UuP4XV4bvU7xmAkci/WRlAznJt9MY=";
};
unpackPhase = "true";
installPhase = ''
mkdir "$out"
cp "$src" "$out/daisyui-theme.js"
'';
};
rust = pkgs.rust-bin.stable.latest.default.override {
targets = [ "wasm32-unknown-unknown" ];
};
@@ -82,7 +54,7 @@
wasm-bindgen-cli_0_2_123
binaryen
lld
tailwindcss_4
(tailwindcss_4.withPackages [daisyui daisyui-theme])
postgresql
];
@@ -90,9 +62,6 @@
in
rec {
devShells.default = pkgs.mkShell {
DAISYUI_PATH = "${daisyui}";
DAISYUI_THEME_PATH = "${daisyui-theme}";
buildInputs = with pkgs; [
diesel-cli
] ++ build-pkgs;
@@ -104,8 +73,6 @@
name = "libretunes";
src = ./.;
DAISYUI_PATH = "${daisyui}";
DAISYUI_THEME_PATH = "${daisyui-theme}";
GIT_REV = rev;
cargoLock.lockFile = ./Cargo.lock;

View File

@@ -1,18 +0,0 @@
let daisyui_theme = null;
try {
daisyui_theme = require('daisyui/theme');
} catch (e) { }
if (daisyui_theme == null) {
try {
daisyui_theme = require(`${process.env.DAISYUI_THEME_PATH}/daisyui-theme.js`);
} catch (e) { }
}
if (daisyui_theme == null) {
console.error('Could not find DaisyUI/theme');
throw new Error('Could not find DaisyUI/theme');
}
export default daisyui_theme.default || daisyui_theme;

View File

@@ -1,18 +0,0 @@
let daisyui = null;
try {
daisyui = require('daisyui');
} catch (e) { }
if (daisyui == null) {
try {
daisyui = require(`${process.env.DAISYUI_PATH}/daisyui.js`);
} catch (e) { }
}
if (daisyui == null) {
console.error('Could not find DaisyUI');
throw new Error('Could not find DaisyUI');
}
export default daisyui.default || daisyui;

View File

@@ -1,10 +1,10 @@
@import "tailwindcss";
@plugin "./daisyui-wrapper.js" {
@plugin "daisyui" {
themes: all;
};
@plugin "./daisyui-theme-wrapper.js" {
@plugin "daisyui-theme" {
};
@source not "*";