feat(material-rounded-theme): use latest release instead of latest git
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
1b9de1ed75
commit
b611d99863
10 changed files with 26 additions and 64 deletions
|
@ -58,7 +58,7 @@ const main = async() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args['m'] || args['material-rounded-theme']) {
|
if (args['m'] || args['material-rounded-theme']) {
|
||||||
console.log(updateCustomPackage(
|
console.log(runNixUpdate(
|
||||||
'scopedPackages.x86_64-linux.lovelace-components.material-rounded-theme',
|
'scopedPackages.x86_64-linux.lovelace-components.material-rounded-theme',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -123,9 +123,6 @@ const main = async() => {
|
||||||
console.log(updateCustomPackage(
|
console.log(updateCustomPackage(
|
||||||
'scopedPackages.x86_64-linux.lovelace-components.custom-sidebar',
|
'scopedPackages.x86_64-linux.lovelace-components.custom-sidebar',
|
||||||
));
|
));
|
||||||
console.log(updateCustomPackage(
|
|
||||||
'scopedPackages.x86_64-linux.lovelace-components.material-rounded-theme',
|
|
||||||
));
|
|
||||||
console.log(updateCustomPackage('some-sass-language-server'));
|
console.log(updateCustomPackage('some-sass-language-server'));
|
||||||
|
|
||||||
// nix-update executions
|
// nix-update executions
|
||||||
|
@ -144,6 +141,9 @@ const main = async() => {
|
||||||
updatePackage('pam-fprint-grosshack');
|
updatePackage('pam-fprint-grosshack');
|
||||||
updatePackage('protonhax');
|
updatePackage('protonhax');
|
||||||
updatePackage('trash-d');
|
updatePackage('trash-d');
|
||||||
|
updatePackage(
|
||||||
|
'scopedPackages.x86_64-linux.lovelace-components.material-rounded-theme',
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
spawnSync('nixFastBuild', [], {
|
spawnSync('nixFastBuild', [], {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
caule-themes-src,
|
caule-themes-src,
|
||||||
dracul-ha-src,
|
dracul-ha-src,
|
||||||
material-rounded-theme-src,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
self,
|
self,
|
||||||
|
@ -9,6 +8,8 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) attrValues singleton;
|
inherit (lib) attrValues singleton;
|
||||||
inherit (pkgs.writers) writeYAML;
|
inherit (pkgs.writers) writeYAML;
|
||||||
|
|
||||||
|
material-rounded-theme-src = self.scopedPackages.${pkgs.system}.lovelace-components.material-rounded-theme.src;
|
||||||
in {
|
in {
|
||||||
services.home-assistant = {
|
services.home-assistant = {
|
||||||
configFiles = {
|
configFiles = {
|
||||||
|
|
17
flake.lock
generated
17
flake.lock
generated
|
@ -958,22 +958,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"material-rounded-theme-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1737141695,
|
|
||||||
"narHash": "sha256-VmO8AKyjl756ojIRyPXNeq6y0mLs9O2jLp82ej5rwY4=",
|
|
||||||
"owner": "Nerwyn",
|
|
||||||
"repo": "material-rounded-theme",
|
|
||||||
"rev": "7c69a1f03e424ab2485345e5f38ffc5264ead375",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Nerwyn",
|
|
||||||
"repo": "material-rounded-theme",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"material-symbols-src": {
|
"material-symbols-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1682,7 +1666,6 @@
|
||||||
"kompass": "kompass",
|
"kompass": "kompass",
|
||||||
"lib-aggregate": "lib-aggregate",
|
"lib-aggregate": "lib-aggregate",
|
||||||
"libratbag-src": "libratbag-src",
|
"libratbag-src": "libratbag-src",
|
||||||
"material-rounded-theme-src": "material-rounded-theme-src",
|
|
||||||
"material-symbols-src": "material-symbols-src",
|
"material-symbols-src": "material-symbols-src",
|
||||||
"minix": "minix",
|
"minix": "minix",
|
||||||
"modernz-src": "modernz-src",
|
"modernz-src": "modernz-src",
|
||||||
|
|
|
@ -221,12 +221,6 @@
|
||||||
repo = "libratbag";
|
repo = "libratbag";
|
||||||
type = "github";
|
type = "github";
|
||||||
};
|
};
|
||||||
material-rounded-theme-src = {
|
|
||||||
flake = false;
|
|
||||||
owner = "Nerwyn";
|
|
||||||
repo = "material-rounded-theme";
|
|
||||||
type = "github";
|
|
||||||
};
|
|
||||||
material-symbols-src = {
|
material-symbols-src = {
|
||||||
flake = false;
|
flake = false;
|
||||||
owner = "beecho01";
|
owner = "beecho01";
|
||||||
|
|
|
@ -293,10 +293,6 @@ let
|
||||||
owner = "ricardoquecria";
|
owner = "ricardoquecria";
|
||||||
repo = "caule-themes-pack-1";
|
repo = "caule-themes-pack-1";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
owner = "Nerwyn";
|
|
||||||
repo = "material-rounded-theme";
|
|
||||||
}
|
|
||||||
|
|
||||||
## Lovelace Components
|
## Lovelace Components
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ in
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
owner = "mishakmak";
|
owner = "mishakmak";
|
||||||
repo = "pam-fprint-grosshack";
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-obczZbf/oH4xGaVvp3y3ZyDdYhZnxlCWvL0irgEYIi0=";
|
hash = "sha256-obczZbf/oH4xGaVvp3y3ZyDdYhZnxlCWvL0irgEYIi0=";
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@ in
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jcnils";
|
owner = "jcnils";
|
||||||
repo = "protonhax";
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-5G4MCWuaF/adSc9kpW/4oDWFFRpviTKMXYAuT2sFf9w=";
|
hash = "sha256-5G4MCWuaF/adSc9kpW/4oDWFFRpviTKMXYAuT2sFf9w=";
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,11 +6,13 @@
|
||||||
stdenv,
|
stdenv,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
package = builtins.fromJSON (builtins.readFile "${custom-sidebar-src}/package.json");
|
inherit (builtins) fromJSON readFile;
|
||||||
|
|
||||||
|
package = fromJSON (readFile "${custom-sidebar-src}/package.json");
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "custom-sidebar";
|
pname = "custom-sidebar";
|
||||||
inherit (package) version;
|
version = "${package.version}+${custom-sidebar-src.shortRev}";
|
||||||
|
|
||||||
src = custom-sidebar-src;
|
src = custom-sidebar-src;
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,30 @@
|
||||||
{
|
{
|
||||||
buildNpmPackage,
|
buildNpmPackage,
|
||||||
concatTextFile,
|
fetchFromGitHub,
|
||||||
material-rounded-theme-src,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
package = builtins.fromJSON (builtins.readFile "${material-rounded-theme-src}/package.json");
|
pname = "material-rounded-theme";
|
||||||
|
version = "3.0.6";
|
||||||
in
|
in
|
||||||
buildNpmPackage {
|
buildNpmPackage {
|
||||||
pname = package.name;
|
inherit pname version;
|
||||||
inherit (package) version;
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Nerwyn";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-OJllOW8YDcmAckcDO5e/fa0zdz7QRX8PgMC0OU0OKIY=";
|
||||||
|
};
|
||||||
|
|
||||||
src = material-rounded-theme-src;
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace ./webpack.config.js --replace-fail "git branch --show-current" "echo main"
|
substituteInPlace ./webpack.config.js --replace-fail \
|
||||||
|
"git branch --show-current" "echo main"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
npmDepsHash = "sha256-Vn4OBTM9MoS0LuU4nDYebncvD6wKmfcLP3gHh0CyfaM=";
|
npmDepsHash = "sha256-JsDWiRFZkn2Gji07LdsNAQO2W7HdwQRTIs6RPFlzf4A=";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp ./dist/* $out
|
cp ./dist/* $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.update = concatTextFile {
|
|
||||||
name = "update";
|
|
||||||
files = [./update.sh];
|
|
||||||
executable = true;
|
|
||||||
destination = "/bin/update";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
file="$FLAKE/scopedPackages/lovelace-components/material-rounded-theme/default.nix"
|
|
||||||
old_hash="$(sed -n 's/.*npmDepsHash = "\(.*\)";/\1/p' "$file")"
|
|
||||||
|
|
||||||
sed -i "s/npmDepsHash = .*/npmDepsHash = \"\";/" "$file"
|
|
||||||
npm_hash="$(nix build "$FLAKE#scopedPackages.x86_64-linux.lovelace-components.material-rounded-theme" |& sed -n 's/.*got: *//p')"
|
|
||||||
|
|
||||||
if [[ "$npm_hash" != "$old_hash" ]]; then
|
|
||||||
sed -i "s#npmDepsHash = .*#npmDepsHash = \"$npm_hash\";#" "$file"
|
|
||||||
else
|
|
||||||
sed -i "s#npmDepsHash = .*#npmDepsHash = \"$old_hash\";#" "$file"
|
|
||||||
fi
|
|
Loading…
Add table
Reference in a new issue