Add daisyui
Add wrapper scripts and fetch JS for nix compatibility
This commit is contained in:
40
flake.nix
40
flake.nix
@@ -38,6 +38,40 @@
|
||||
];
|
||||
};
|
||||
|
||||
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-IHsOrki86HGPW02ERe3gXTatzWJjjQ6EPQ3eodW/yXw=";
|
||||
};
|
||||
|
||||
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" ];
|
||||
};
|
||||
@@ -52,6 +86,9 @@
|
||||
in
|
||||
rec {
|
||||
devShells.default = pkgs.mkShell {
|
||||
DAISYUI_PATH = "${daisyui}";
|
||||
DAISYUI_THEME_PATH = "${daisyui-theme}";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
rust
|
||||
] ++ build-pkgs;
|
||||
@@ -63,6 +100,9 @@
|
||||
name = "libretunes";
|
||||
src = ./.;
|
||||
|
||||
DAISYUI_PATH = "${daisyui}";
|
||||
DAISYUI_THEME_PATH = "${daisyui-theme}";
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
|
||||
Reference in New Issue
Block a user