Use daisyui flake
This commit is contained in:
45
flake.nix
45
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;
|
||||
|
||||
Reference in New Issue
Block a user