daed: 1.0.0 -> 1.27.0, add maintainer

This commit is contained in:
ccicnce113424
2026-04-17 21:09:14 +08:00
parent 74ddeb287f
commit 5dae15112c

View File

@@ -1,9 +1,9 @@
{
pnpm_9,
pnpm_10,
fetchPnpmDeps,
pnpmConfigHook,
nodejs,
stdenv,
stdenvNoCC,
clang,
buildGoModule,
fetchFromGitHub,
@@ -11,39 +11,45 @@
_experimental-update-script-combinators,
nix-update-script,
}:
let
pnpm = pnpm_10;
in
buildGoModule (finalAttrs: {
pname = "daed";
version = "1.0.0";
version = "1.27.0";
src = fetchFromGitHub {
owner = "daeuniverse";
repo = "daed";
tag = "v${version}";
hash = "sha256-WaybToEcFrKOcJ+vfCTc9uyHkTPOrcAEw9lZFEIBPgY=";
tag = "v${finalAttrs.version}";
hash = "sha256-CvxCDdOLsdSlFfmoR+C1IUt9HvkAV5JsWGI94DLXB+U=";
fetchSubmodules = true;
};
web = stdenv.mkDerivation {
inherit pname version src;
sourceRoot = "${finalAttrs.src.name}/wing";
web = stdenvNoCC.mkDerivation {
inherit (finalAttrs) pname version src;
pnpmDeps = fetchPnpmDeps {
inherit
inherit (finalAttrs)
pname
version
src
;
pnpm = pnpm_9;
inherit pnpm;
fetcherVersion = 3;
hash = "sha256-FBZk7qeYNi7JX99Sk1qe52YUE8GUYINJKid0mEBXMjU=";
hash = "sha256-2g/M+4XI1EM+c7W82qyfH8C7sX+Y0QACiSpn65Vei4g=";
};
nativeBuildInputs = [
nodejs
pnpmConfigHook
pnpm_9
pnpm
];
strictDeps = true;
__structuredAttrs = true;
buildPhase = ''
runHook preBuild
@@ -55,25 +61,14 @@ let
installPhase = ''
runHook preInstall
cp -R dist $out
mkdir -p $out
cp -R apps/web/dist/* $out
runHook postInstall
'';
};
in
buildGoModule rec {
inherit
pname
version
src
web
;
sourceRoot = "${src.name}/wing";
vendorHash = "sha256-+uf8PJQvsJMUyQ6W+nDfdwrxBO2YRUL328ajTJpVDZk=";
vendorHash = "sha256-l7jgMvrbpOY2+cvnc0e5cvSgKVm4GcWC+bPbff+PE80=";
proxyVendor = true;
nativeBuildInputs = [ clang ];
@@ -84,9 +79,9 @@ buildGoModule rec {
substituteInPlace Makefile \
--replace-fail /bin/bash /bin/sh
# ${web} does not have write permission
# ${finalAttrs.web} does not have write permission
mkdir dist
cp -r ${web}/* dist
cp -r ${finalAttrs.web}/* dist
chmod -R 755 dist
'';
@@ -96,8 +91,8 @@ buildGoModule rec {
make CFLAGS="-D__REMOVE_BPF_PRINTK -fno-stack-protector -Wno-unused-command-line-argument" \
NOSTRIP=y \
WEB_DIST=dist \
AppName=${pname} \
VERSION=${version} \
AppName=daed \
VERSION=${finalAttrs.version} \
OUTPUT=$out/bin/daed \
bundle
@@ -110,21 +105,28 @@ buildGoModule rec {
--replace-fail /usr/bin $out/bin
'';
passthru.updateScript = _experimental-update-script-combinators.sequence [
(nix-update-script {
attrPath = "daed.web";
})
(nix-update-script {
extraArgs = [ "--version=skip" ];
})
];
passthru = {
inherit (finalAttrs) web;
updateScript = _experimental-update-script-combinators.sequence [
(nix-update-script {
attrPath = "daed.web";
extraArgs = [ "--use-github-releases" ];
})
(nix-update-script {
extraArgs = [ "--version=skip" ];
})
];
};
meta = {
description = "Modern dashboard with dae";
homepage = "https://github.com/daeuniverse/daed";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ oluceps ];
maintainers = with lib.maintainers; [
oluceps
ccicnce113424
];
platforms = lib.platforms.linux;
mainProgram = "daed";
};
}
})