Compare commits
3 Commits
b66bc54b3f
...
e95f335d76
| Author | SHA1 | Date | |
|---|---|---|---|
|
e95f335d76
|
|||
|
55db6c317c
|
|||
|
aff6b9a760
|
34
flake.lock
generated
34
flake.lock
generated
@@ -1,5 +1,20 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"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": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
@@ -36,9 +51,11 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"daisyui": "daisyui",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay",
|
||||||
|
"tailwindcss-with-pkgs": "tailwindcss-with-pkgs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
@@ -75,6 +92,21 @@
|
|||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"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",
|
"root": "root",
|
||||||
|
|||||||
47
flake.nix
47
flake.nix
@@ -8,6 +8,10 @@
|
|||||||
url = "github:oxalica/rust-overlay";
|
url = "github:oxalica/rust-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
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:
|
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }@inputs:
|
||||||
@@ -35,43 +39,11 @@
|
|||||||
overlays = [
|
overlays = [
|
||||||
(import rust-overlay)
|
(import rust-overlay)
|
||||||
wasm-bindgen-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 {
|
rust = pkgs.rust-bin.stable.latest.default.override {
|
||||||
targets = [ "wasm32-unknown-unknown" ];
|
targets = [ "wasm32-unknown-unknown" ];
|
||||||
};
|
};
|
||||||
@@ -82,7 +54,7 @@
|
|||||||
wasm-bindgen-cli_0_2_123
|
wasm-bindgen-cli_0_2_123
|
||||||
binaryen
|
binaryen
|
||||||
lld
|
lld
|
||||||
tailwindcss_4
|
(tailwindcss_4.withPackages [daisyui daisyui-theme])
|
||||||
postgresql
|
postgresql
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -90,9 +62,6 @@
|
|||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
DAISYUI_PATH = "${daisyui}";
|
|
||||||
DAISYUI_THEME_PATH = "${daisyui-theme}";
|
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
diesel-cli
|
diesel-cli
|
||||||
] ++ build-pkgs;
|
] ++ build-pkgs;
|
||||||
@@ -104,8 +73,6 @@
|
|||||||
name = "libretunes";
|
name = "libretunes";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
DAISYUI_PATH = "${daisyui}";
|
|
||||||
DAISYUI_THEME_PATH = "${daisyui-theme}";
|
|
||||||
GIT_REV = rev;
|
GIT_REV = rev;
|
||||||
|
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
|||||||
@@ -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;
|
|
||||||
@@ -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;
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
@plugin "./daisyui-wrapper.js" {
|
@plugin "daisyui" {
|
||||||
themes: all;
|
themes: all;
|
||||||
};
|
};
|
||||||
|
|
||||||
@plugin "./daisyui-theme-wrapper.js" {
|
@plugin "daisyui-theme" {
|
||||||
};
|
};
|
||||||
|
|
||||||
@source not "*";
|
@source not "*";
|
||||||
|
|||||||
Reference in New Issue
Block a user