qui: init at 1.7.0 (#462564)
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
stdenvNoCC,
|
||||
nix-update-script,
|
||||
nodejs,
|
||||
pnpm_9,
|
||||
typescript,
|
||||
versionCheckHook,
|
||||
}:
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "qui";
|
||||
version = "1.7.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "autobrr";
|
||||
repo = "qui";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-CbPdngskDCAAhmsj5DPdnviZSWM0bO13Pbe7wRwaNaw=";
|
||||
};
|
||||
|
||||
qui-web = stdenvNoCC.mkDerivation (finalAttrs': {
|
||||
pname = "${finalAttrs.pname}-web";
|
||||
inherit (finalAttrs) src version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
pnpm_9.configHook
|
||||
typescript
|
||||
];
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/web";
|
||||
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit (finalAttrs')
|
||||
pname
|
||||
version
|
||||
src
|
||||
sourceRoot
|
||||
;
|
||||
fetcherVersion = 2;
|
||||
hash = "sha256-WKoWts+/TGcGy/rFEJN3Qn/vq+gj+Mq+VcTYowEyvus=";
|
||||
};
|
||||
|
||||
postBuild = ''
|
||||
pnpm run build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -r dist $out
|
||||
'';
|
||||
});
|
||||
|
||||
vendorHash = "sha256-rmUEFX8UzxEN7XaJ8Zj+kj3z1pwLkq3FTYzbPWnifW0=";
|
||||
|
||||
preBuild = ''
|
||||
cp -r ${finalAttrs.qui-web}/* web/dist
|
||||
'';
|
||||
|
||||
ldflags = [
|
||||
"-X github.com/autobrr/qui/internal/buildinfo.Version=${finalAttrs.version}"
|
||||
"-X main.PolarOrgID="
|
||||
];
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckProgramArg = "version";
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--subpackage"
|
||||
"qui-web"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Modern alternative webUI for qBittorrent, with multi-instance support";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
homepage = "https://github.com/autobrr/qui";
|
||||
changelog = "https://github.com/autobrr/qui/releases/tag/v${finalAttrs.version}";
|
||||
maintainers = with lib.maintainers; [ pta2002 ];
|
||||
mainProgram = "qui";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user