diff --git a/flake.lock b/flake.lock index ab4c4c2..9e0d611 100644 --- a/flake.lock +++ b/flake.lock @@ -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,6 +51,7 @@ }, "root": { "inputs": { + "daisyui": "daisyui", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" diff --git a/flake.nix b/flake.nix index da66e8b..ebb5a52 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,8 @@ url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; + + daisyui.url = "git+https://git.mregirouard.com/nix/daisyui.git"; }; outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }@inputs: @@ -35,43 +37,10 @@ overlays = [ (import rust-overlay) wasm-bindgen-overlay + inputs.daisyui.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" ]; }; @@ -90,8 +59,8 @@ in rec { devShells.default = pkgs.mkShell { - DAISYUI_PATH = "${daisyui}"; - DAISYUI_THEME_PATH = "${daisyui-theme}"; + DAISYUI_PATH = "${pkgs.daisyui}"; + DAISYUI_THEME_PATH = "${pkgs.daisyui-theme}"; buildInputs = with pkgs; [ diesel-cli @@ -104,8 +73,8 @@ name = "libretunes"; src = ./.; - DAISYUI_PATH = "${daisyui}"; - DAISYUI_THEME_PATH = "${daisyui-theme}"; + DAISYUI_PATH = "${pkgs.daisyui}"; + DAISYUI_THEME_PATH = "${pkgs.daisyui-theme}"; GIT_REV = rev; cargoLock.lockFile = ./Cargo.lock;