push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,161 @@
Date: Mon, 17 May 2021 18:28:54 +0200
Subject: [PATCH 2/2] add scaling factor to source
---
zod_launcher_src/zod_launcherFrm.cpp | 84 ++++++++++++++--------------
1 file changed, 42 insertions(+), 42 deletions(-)
diff --git a/zod_launcher_src/zod_launcherFrm.cpp b/zod_launcher_src/zod_launcherFrm.cpp
index 54bb9aa..de268f2 100644
--- a/zod_launcher_src/zod_launcherFrm.cpp
+++ b/zod_launcher_src/zod_launcherFrm.cpp
@@ -83,15 +83,15 @@ void zod_launcherFrm::CreateGUIControls()
//Add the custom code before or after the blocks
////GUI Items Creation Start
- WxButton4 = new wxButton(this, ID_WXBUTTON4, wxT("Previous Settings"), wxPoint(280, 16), wxSize(249, 25), 0, wxDefaultValidator, wxT("WxButton4"));
+ WxButton4 = new wxButton(this, ID_WXBUTTON4, wxT("Previous Settings"), wxPoint(@scalingFactor@*280,@scalingFactor@*16), wxSize(@scalingFactor@*249,@scalingFactor@*25), 0, wxDefaultValidator, wxT("WxButton4"));
- WxStaticText11 = new wxStaticText(this, ID_WXSTATICTEXT11, wxT("Login Password::"), wxPoint(280, 120), wxDefaultSize, 0, wxT("WxStaticText11"));
+ WxStaticText11 = new wxStaticText(this, ID_WXSTATICTEXT11, wxT("Login Password::"), wxPoint(@scalingFactor@*280,@scalingFactor@*120), wxDefaultSize, 0, wxT("WxStaticText11"));
- WxStaticText10 = new wxStaticText(this, ID_WXSTATICTEXT10, wxT("Login Name::"), wxPoint(280, 96), wxDefaultSize, 0, wxT("WxStaticText10"));
+ WxStaticText10 = new wxStaticText(this, ID_WXSTATICTEXT10, wxT("Login Name::"), wxPoint(@scalingFactor@*280,@scalingFactor@*96), wxDefaultSize, 0, wxT("WxStaticText10"));
- WxEdit9 = new wxTextCtrl(this, ID_WXEDIT9, wxT(""), wxPoint(384, 120), wxSize(145, 17), 0, wxDefaultValidator, wxT("WxEdit9"));
+ WxEdit9 = new wxTextCtrl(this, ID_WXEDIT9, wxT(""), wxPoint(@scalingFactor@*384,@scalingFactor@*120), wxSize(@scalingFactor@*145,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit9"));
- WxEdit8 = new wxTextCtrl(this, ID_WXEDIT8, wxT(""), wxPoint(384, 96), wxSize(145, 17), 0, wxDefaultValidator, wxT("WxEdit8"));
+ WxEdit8 = new wxTextCtrl(this, ID_WXEDIT8, wxT(""), wxPoint(@scalingFactor@*384,@scalingFactor@*96), wxSize(@scalingFactor@*145,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit8"));
WxMenuBar1 = new wxMenuBar();
wxMenu *ID_MNU_FILE_1001_Mnu_Obj = new wxMenu(0);
@@ -103,45 +103,45 @@ void zod_launcherFrm::CreateGUIControls()
WxMenuBar1->Append(ID_MNU_ABOUT_1003_Mnu_Obj, wxT("About"));
SetMenuBar(WxMenuBar1);
- WxCheckBox11 = new wxCheckBox(this, ID_WXCHECKBOX11, wxT("yellow"), wxPoint(152, 208), wxSize(49, 17), 0, wxDefaultValidator, wxT("WxCheckBox11"));
+ WxCheckBox11 = new wxCheckBox(this, ID_WXCHECKBOX11, wxT("yellow"), wxPoint(@scalingFactor@*152,@scalingFactor@*208), wxSize(@scalingFactor@*49,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox11"));
- WxCheckBox10 = new wxCheckBox(this, ID_WXCHECKBOX10, wxT("green"), wxPoint(104, 208), wxSize(49, 17), 0, wxDefaultValidator, wxT("WxCheckBox10"));
+ WxCheckBox10 = new wxCheckBox(this, ID_WXCHECKBOX10, wxT("green"), wxPoint(@scalingFactor@*104,@scalingFactor@*208), wxSize(@scalingFactor@*49,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox10"));
- WxCheckBox9 = new wxCheckBox(this, ID_WXCHECKBOX9, wxT("blue"), wxPoint(56, 208), wxSize(41, 17), 0, wxDefaultValidator, wxT("WxCheckBox9"));
+ WxCheckBox9 = new wxCheckBox(this, ID_WXCHECKBOX9, wxT("blue"), wxPoint(@scalingFactor@*56,@scalingFactor@*208), wxSize(@scalingFactor@*41,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox9"));
- WxCheckBox8 = new wxCheckBox(this, ID_WXCHECKBOX8, wxT("red"), wxPoint(8, 208), wxSize(41, 17), 0, wxDefaultValidator, wxT("WxCheckBox8"));
+ WxCheckBox8 = new wxCheckBox(this, ID_WXCHECKBOX8, wxT("red"), wxPoint(@scalingFactor@*8,@scalingFactor@*208), wxSize(@scalingFactor@*41,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox8"));
- WxStaticBox5 = new wxStaticBox(this, ID_WXSTATICBOX5, wxT("AI Players"), wxPoint(0, 192), wxSize(265, 49));
+ WxStaticBox5 = new wxStaticBox(this, ID_WXSTATICBOX5, wxT("AI Players"), wxPoint(@scalingFactor@*0,@scalingFactor@*192), wxSize(@scalingFactor@*265,@scalingFactor@*49));
- WxCheckBox7 = new wxCheckBox(this, ID_WXCHECKBOX7, wxT("No Music"), wxPoint(376, 192), wxSize(65, 17), 0, wxDefaultValidator, wxT("WxCheckBox7"));
+ WxCheckBox7 = new wxCheckBox(this, ID_WXCHECKBOX7, wxT("No Music"), wxPoint(@scalingFactor@*376,@scalingFactor@*192), wxSize(@scalingFactor@*65,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox7"));
- WxCheckBox6 = new wxCheckBox(this, ID_WXCHECKBOX6, wxT("No OpenGL"), wxPoint(280, 208), wxSize(81, 17), 0, wxDefaultValidator, wxT("WxCheckBox6"));
+ WxCheckBox6 = new wxCheckBox(this, ID_WXCHECKBOX6, wxT("No OpenGL"), wxPoint(@scalingFactor@*280,@scalingFactor@*208), wxSize(@scalingFactor@*81,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox6"));
- WxEdit7 = new wxTextCtrl(this, ID_WXEDIT7, wxT(""), wxPoint(112, 160), wxSize(145, 17), 0, wxDefaultValidator, wxT("WxEdit7"));
+ WxEdit7 = new wxTextCtrl(this, ID_WXEDIT7, wxT(""), wxPoint(@scalingFactor@*112,@scalingFactor@*160), wxSize(@scalingFactor@*145,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit7"));
- WxStaticText9 = new wxStaticText(this, ID_WXSTATICTEXT9, wxT("Settings Filename::"), wxPoint(8, 160), wxDefaultSize, 0, wxT("WxStaticText9"));
+ WxStaticText9 = new wxStaticText(this, ID_WXSTATICTEXT9, wxT("Settings Filename::"), wxPoint(@scalingFactor@*8,@scalingFactor@*160), wxDefaultSize, 0, wxT("WxStaticText9"));
- WxButton3 = new wxButton(this, ID_WXBUTTON3, wxT("Launch Zod Engine"), wxPoint(208, 304), wxSize(121, 17), 0, wxDefaultValidator, wxT("WxButton3"));
+ WxButton3 = new wxButton(this, ID_WXBUTTON3, wxT("Launch Zod Engine"), wxPoint(@scalingFactor@*208,@scalingFactor@*304), wxSize(@scalingFactor@*121,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxButton3"));
- WxStaticText8 = new wxStaticText(this, ID_WXSTATICTEXT8, wxT("--- Command Arguments ---"), wxPoint(8, 264), wxSize(520, 17), wxALIGN_CENTRE | wxST_NO_AUTORESIZE, wxT("WxStaticText8"));
+ WxStaticText8 = new wxStaticText(this, ID_WXSTATICTEXT8, wxT("--- Command Arguments ---"), wxPoint(@scalingFactor@*8,@scalingFactor@*264), wxSize(@scalingFactor@*520,@scalingFactor@*17), wxALIGN_CENTRE | wxST_NO_AUTORESIZE, wxT("WxStaticText8"));
- WxEdit6 = new wxTextCtrl(this, ID_WXEDIT6, wxT(""), wxPoint(8, 280), wxSize(521, 17), 0, wxDefaultValidator, wxT("WxEdit6"));
+ WxEdit6 = new wxTextCtrl(this, ID_WXEDIT6, wxT(""), wxPoint(@scalingFactor@*8,@scalingFactor@*280), wxSize(@scalingFactor@*521,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit6"));
- WxStaticBox4 = new wxStaticBox(this, ID_WXSTATICBOX4, wxT("Launch Game"), wxPoint(0, 248), wxSize(537, 81));
+ WxStaticBox4 = new wxStaticBox(this, ID_WXSTATICBOX4, wxT("Launch Game"), wxPoint(@scalingFactor@*0,@scalingFactor@*248), wxSize(@scalingFactor@*537,@scalingFactor@*81));
- WxCheckBox5 = new wxCheckBox(this, ID_WXCHECKBOX5, wxT("Bland Cursor"), wxPoint(448, 208), wxSize(81, 17), 0, wxDefaultValidator, wxT("WxCheckBox5"));
+ WxCheckBox5 = new wxCheckBox(this, ID_WXCHECKBOX5, wxT("Bland Cursor"), wxPoint(@scalingFactor@*448,@scalingFactor@*208), wxSize(@scalingFactor@*81,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox5"));
- WxCheckBox4 = new wxCheckBox(this, ID_WXCHECKBOX4, wxT("No Sound"), wxPoint(448, 192), wxSize(73, 17), 0, wxDefaultValidator, wxT("WxCheckBox4"));
+ WxCheckBox4 = new wxCheckBox(this, ID_WXCHECKBOX4, wxT("No Sound"), wxPoint(@scalingFactor@*448,@scalingFactor@*192), wxSize(@scalingFactor@*73,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox4"));
- WxCheckBox3 = new wxCheckBox(this, ID_WXCHECKBOX3, wxT("Is Windowed"), wxPoint(280, 192), wxSize(89, 17), 0, wxDefaultValidator, wxT("WxCheckBox3"));
+ WxCheckBox3 = new wxCheckBox(this, ID_WXCHECKBOX3, wxT("Is Windowed"), wxPoint(@scalingFactor@*280,@scalingFactor@*192), wxSize(@scalingFactor@*89,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox3"));
- WxStaticText7 = new wxStaticText(this, ID_WXSTATICTEXT7, wxT("x"), wxPoint(448, 168), wxSize(18, 17), wxALIGN_CENTRE | wxST_NO_AUTORESIZE, wxT("WxStaticText7"));
+ WxStaticText7 = new wxStaticText(this, ID_WXSTATICTEXT7, wxT("x"), wxPoint(@scalingFactor@*448,@scalingFactor@*168), wxSize(@scalingFactor@*18,@scalingFactor@*17), wxALIGN_CENTRE | wxST_NO_AUTORESIZE, wxT("WxStaticText7"));
- WxEdit5 = new wxTextCtrl(this, ID_WXEDIT5, wxT("484"), wxPoint(472, 168), wxSize(57, 17), 0, wxDefaultValidator, wxT("WxEdit5"));
+ WxEdit5 = new wxTextCtrl(this, ID_WXEDIT5, wxT("484"), wxPoint(@scalingFactor@*472,@scalingFactor@*168), wxSize(@scalingFactor@*57,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit5"));
- WxEdit4 = new wxTextCtrl(this, ID_WXEDIT4, wxT("800"), wxPoint(384, 168), wxSize(57, 17), 0, wxDefaultValidator, wxT("WxEdit4"));
+ WxEdit4 = new wxTextCtrl(this, ID_WXEDIT4, wxT("800"), wxPoint(@scalingFactor@*384,@scalingFactor@*168), wxSize(@scalingFactor@*57,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit4"));
- WxStaticText6 = new wxStaticText(this, ID_WXSTATICTEXT6, wxT("Resolution::"), wxPoint(280, 168), wxDefaultSize, 0, wxT("WxStaticText6"));
+ WxStaticText6 = new wxStaticText(this, ID_WXSTATICTEXT6, wxT("Resolution::"), wxPoint(@scalingFactor@*280,@scalingFactor@*168), wxDefaultSize, 0, wxT("WxStaticText6"));
wxArrayString arrayStringFor_WxChoice1;
arrayStringFor_WxChoice1.Add(wxT("null"));
@@ -149,42 +149,42 @@ void zod_launcherFrm::CreateGUIControls()
arrayStringFor_WxChoice1.Add(wxT("blue"));
arrayStringFor_WxChoice1.Add(wxT("green"));
arrayStringFor_WxChoice1.Add(wxT("yellow"));
- WxChoice1 = new wxChoice(this, ID_WXCHOICE1, wxPoint(384, 144), wxSize(145, 21), arrayStringFor_WxChoice1, 0, wxDefaultValidator, wxT("WxChoice1"));
+ WxChoice1 = new wxChoice(this, ID_WXCHOICE1, wxPoint(@scalingFactor@*384,@scalingFactor@*144), wxSize(@scalingFactor@*145,@scalingFactor@*21), arrayStringFor_WxChoice1, 0, wxDefaultValidator, wxT("WxChoice1"));
WxChoice1->SetSelection(1);
- WxStaticText5 = new wxStaticText(this, ID_WXSTATICTEXT5, wxT("Player Team::"), wxPoint(280, 144), wxDefaultSize, 0, wxT("WxStaticText5"));
+ WxStaticText5 = new wxStaticText(this, ID_WXSTATICTEXT5, wxT("Player Team::"), wxPoint(@scalingFactor@*280,@scalingFactor@*144), wxDefaultSize, 0, wxT("WxStaticText5"));
- WxEdit3 = new wxTextCtrl(this, ID_WXEDIT3, wxT(""), wxPoint(384, 72), wxSize(145, 17), 0, wxDefaultValidator, wxT("WxEdit3"));
+ WxEdit3 = new wxTextCtrl(this, ID_WXEDIT3, wxT(""), wxPoint(@scalingFactor@*384,@scalingFactor@*72), wxSize(@scalingFactor@*145,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit3"));
- WxStaticText4 = new wxStaticText(this, ID_WXSTATICTEXT4, wxT("Player Name::"), wxPoint(280, 72), wxDefaultSize, 0, wxT("WxStaticText4"));
+ WxStaticText4 = new wxStaticText(this, ID_WXSTATICTEXT4, wxT("Player Name::"), wxPoint(@scalingFactor@*280,@scalingFactor@*72), wxDefaultSize, 0, wxT("WxStaticText4"));
- WxStaticBox3 = new wxStaticBox(this, ID_WXSTATICBOX3, wxT("Engine Settings"), wxPoint(272, 56), wxSize(265, 185));
+ WxStaticBox3 = new wxStaticBox(this, ID_WXSTATICBOX3, wxT("Engine Settings"), wxPoint(@scalingFactor@*272,@scalingFactor@*56), wxSize(@scalingFactor@*265,@scalingFactor@*185));
- WxEdit2 = new wxTextCtrl(this, ID_WXEDIT2, wxT(""), wxPoint(112, 136), wxSize(145, 17), 0, wxDefaultValidator, wxT("WxEdit2"));
+ WxEdit2 = new wxTextCtrl(this, ID_WXEDIT2, wxT(""), wxPoint(@scalingFactor@*112,@scalingFactor@*136), wxSize(@scalingFactor@*145,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit2"));
- WxStaticText3 = new wxStaticText(this, ID_WXSTATICTEXT3, wxT("Map Filename::"), wxPoint(8, 136), wxDefaultSize, 0, wxT("WxStaticText3"));
+ WxStaticText3 = new wxStaticText(this, ID_WXSTATICTEXT3, wxT("Map Filename::"), wxPoint(@scalingFactor@*8,@scalingFactor@*136), wxDefaultSize, 0, wxT("WxStaticText3"));
- WxCheckBox2 = new wxCheckBox(this, ID_WXCHECKBOX2, wxT("Filename is a Maplist"), wxPoint(96, 112), wxSize(121, 17), 0, wxDefaultValidator, wxT("WxCheckBox2"));
+ WxCheckBox2 = new wxCheckBox(this, ID_WXCHECKBOX2, wxT("Filename is a Maplist"), wxPoint(@scalingFactor@*96,@scalingFactor@*112), wxSize(@scalingFactor@*121,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox2"));
- WxCheckBox1 = new wxCheckBox(this, ID_WXCHECKBOX1, wxT("Is Dedicated"), wxPoint(8, 112), wxSize(89, 17), 0, wxDefaultValidator, wxT("WxCheckBox1"));
+ WxCheckBox1 = new wxCheckBox(this, ID_WXCHECKBOX1, wxT("Is Dedicated"), wxPoint(@scalingFactor@*8,@scalingFactor@*112), wxSize(@scalingFactor@*89,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxCheckBox1"));
- WxStaticText2 = new wxStaticText(this, ID_WXSTATICTEXT2, wxT("----- OR -----"), wxPoint(8, 96), wxSize(249, 17), wxALIGN_CENTRE | wxST_NO_AUTORESIZE, wxT("WxStaticText2"));
+ WxStaticText2 = new wxStaticText(this, ID_WXSTATICTEXT2, wxT("----- OR -----"), wxPoint(@scalingFactor@*8,@scalingFactor@*96), wxSize(@scalingFactor@*249,@scalingFactor@*17), wxALIGN_CENTRE | wxST_NO_AUTORESIZE, wxT("WxStaticText2"));
- WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("Connect Address::"), wxPoint(8, 72), wxDefaultSize, 0, wxT("WxStaticText1"));
+ WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("Connect Address::"), wxPoint(@scalingFactor@*8,@scalingFactor@*72), wxDefaultSize, 0, wxT("WxStaticText1"));
- WxEdit1 = new wxTextCtrl(this, ID_WXEDIT1, wxT(""), wxPoint(112, 72), wxSize(145, 17), 0, wxDefaultValidator, wxT("WxEdit1"));
+ WxEdit1 = new wxTextCtrl(this, ID_WXEDIT1, wxT(""), wxPoint(@scalingFactor@*112,@scalingFactor@*72), wxSize(@scalingFactor@*145,@scalingFactor@*17), 0, wxDefaultValidator, wxT("WxEdit1"));
- WxButton2 = new wxButton(this, ID_WXBUTTON2, wxT("Nighsoft Server"), wxPoint(136, 16), wxSize(121, 25), 0, wxDefaultValidator, wxT("WxButton2"));
+ WxButton2 = new wxButton(this, ID_WXBUTTON2, wxT("Nighsoft Server"), wxPoint(@scalingFactor@*136,@scalingFactor@*16), wxSize(@scalingFactor@*121,@scalingFactor@*25), 0, wxDefaultValidator, wxT("WxButton2"));
- WxButton1 = new wxButton(this, ID_WXBUTTON1, wxT("Local Game"), wxPoint(8, 16), wxSize(121, 25), 0, wxDefaultValidator, wxT("WxButton1"));
+ WxButton1 = new wxButton(this, ID_WXBUTTON1, wxT("Local Game"), wxPoint(@scalingFactor@*8,@scalingFactor@*16), wxSize(@scalingFactor@*121,@scalingFactor@*25), 0, wxDefaultValidator, wxT("WxButton1"));
- WxStaticBox2 = new wxStaticBox(this, ID_WXSTATICBOX2, wxT("Connection Settings"), wxPoint(0, 56), wxSize(265, 129));
+ WxStaticBox2 = new wxStaticBox(this, ID_WXSTATICBOX2, wxT("Connection Settings"), wxPoint(@scalingFactor@*0,@scalingFactor@*56), wxSize(@scalingFactor@*265,@scalingFactor@*129));
- WxStaticBox1 = new wxStaticBox(this, ID_WXSTATICBOX1, wxT("Preset Settings"), wxPoint(0, 0), wxSize(537, 49));
+ WxStaticBox1 = new wxStaticBox(this, ID_WXSTATICBOX1, wxT("Preset Settings"), wxPoint(@scalingFactor@*0,@scalingFactor@*0), wxSize(@scalingFactor@*537,@scalingFactor@*49));
SetTitle(wxT("The Zod Launcher"));
SetIcon(wxNullIcon);
- SetSize(8,8,545,376);
+ SetSize(8,8,@scalingFactor@*545,@scalingFactor@*376);
Center();
////GUI Items Creation End
--
2.29.3

View File

@@ -0,0 +1,138 @@
{
lib,
config,
fetchzip,
stdenv,
SDL,
SDL_image,
SDL_ttf,
SDL_mixer,
libmysqlclient,
wxGTK32,
symlinkJoin,
runCommandLocal,
makeWrapper,
coreutils,
scalingFactor ? 2, # this is to resize the fixed-size zod_launcher window
replaceVars,
}:
let
pname = "zod-engine";
version = "2011-09-06";
src = fetchzip {
url = "mirror://sourceforge/zod/linux_releases/zod_linux-${version}.tar.gz";
hash = "sha256-8HQdtr69IUxXcU5mJEShHWfkEK5pfiTRO2Bn6pRJ+wQ=";
};
postPatch = ''
sed '1i#include <ctime>' -i zod_src/common.cpp # gcc12
'';
nativeBuildInputs = [
makeWrapper
];
buildInputs = [
SDL
SDL_image
SDL_ttf
SDL_mixer
libmysqlclient
wxGTK32
coreutils
];
hardeningDisable = [ "format" ];
NIX_LDFLAGS = "-L${libmysqlclient}/lib/mysql";
zod_engine = stdenv.mkDerivation {
inherit
version
src
postPatch
nativeBuildInputs
buildInputs
hardeningDisable
NIX_LDFLAGS
;
pname = "zod-engine-engine";
enableParallelBuilding = true;
preBuild = "cd zod_src";
installPhase = ''
mkdir -p $out/bin
install -m755 zod $out/bin/
wrapProgram $out/bin/zod --chdir "${zod_assets}/usr/lib/commander-zod"
'';
};
zod_map_editor = stdenv.mkDerivation {
inherit
version
src
postPatch
nativeBuildInputs
buildInputs
hardeningDisable
NIX_LDFLAGS
;
pname = "zod-engine-map_editor";
enableParallelBuilding = true;
preBuild = "cd zod_src";
makeFlags = [ "map_editor" ];
installPhase = ''
mkdir -p $out/bin
install -m755 zod_map_editor $out/bin
wrapProgram $out/bin/zod_map_editor --chdir "${zod_assets}/usr/lib/commander-zod"
'';
};
zod_launcher = stdenv.mkDerivation {
inherit
version
src
nativeBuildInputs
buildInputs
zod_engine
zod_map_editor
;
pname = "zod-engine-launcher";
# This is necessary because the zod_launcher has terrible fixed-width window
# the Idea is to apply the scalingFactor to all positions and sizes and I tested 1,2,3 and 4
# 2,3,4 look acceptable on my 4k monitor and 1 is unreadable.
# also the ./ in the run command is removed to have easier time starting the game
patches = [
(replaceVars ./0002-add-scaling-factor-to-source.patch {
inherit scalingFactor;
})
];
postPatch = ''
substituteInPlace zod_launcher_src/zod_launcherFrm.cpp \
--replace 'message = wxT("./zod");' 'message = wxT("zod");' \
--replace "check.replace(i,1,1,'_');" "check.replace(i,1,1,(wxUniChar)'_');"
'';
preBuild = "cd zod_launcher_src";
installPhase = ''
mkdir -p $out/bin
install -m755 zod_launcher $out/bin
'';
};
zod_assets = runCommandLocal "zod-engine-assets" { } ''
mkdir -p $out/usr/lib/commander-zod{,blank_maps}
cp -r ${src}/assets $out/usr/lib/commander-zod/assets
for i in ${src}/*.map ${src}/*.txt; do
install -m644 $i $out/usr/lib/commander-zod
done
for map in ${src}/blank_maps/*; do
install -m644 $map $out/usr/lib/commander-zod/blank_maps
done
'';
in
symlinkJoin {
inherit pname version;
paths = [
zod_engine
zod_launcher
zod_map_editor
zod_assets
];
meta = {
description = "Multiplayer remake of ZED";
homepage = "https://zod.sourceforge.net/";
maintainers = with lib.maintainers; [ zeri ];
license = lib.licenses.gpl3Plus; # Says the website
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
buildGoModule,
fetchFromGitHub,
gitMinimal,
nix-update-script,
}:
buildGoModule {
pname = "zoekt";
version = "3.7.2-2-unstable-2025-09-02";
src = fetchFromGitHub {
owner = "sourcegraph";
repo = "zoekt";
rev = "4e4a529c3b63c7d4c7897ba736f1cd52cc163134";
hash = "sha256-aRQQAG0qZOrkdbQoQRXeddhMmQaB+/ESD6Ba+q4UIlI=";
};
vendorHash = "sha256-urXYBv8+C2jwnr5PjXz7nUyX/Gz4wmtS76UTXFqfQFk=";
nativeCheckInputs = [
gitMinimal
];
preCheck = ''
export HOME=`mktemp -d`
git config --global --replace-all protocol.file.allow always
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version"
"branch"
];
};
meta = {
description = "Fast trigram based code search";
homepage = "https://github.com/sourcegraph/zoekt";
license = lib.licenses.asl20;
maintainers = [ ];
mainProgram = "zoekt";
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
pkg-config,
oniguruma,
installShellFiles,
zola,
testers,
}:
rustPlatform.buildRustPackage rec {
pname = "zola";
version = "0.21.0";
src = fetchFromGitHub {
owner = "getzola";
repo = "zola";
rev = "v${version}";
hash = "sha256-+/0MhKKDSbOEa5btAZyaS3bQPeGJuski/07I4Q9v9cg=";
};
cargoHash = "sha256-K2wdq61FVVG9wJF+UcRZyZ2YSEw3iavboAGkzCcTGkU=";
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [
oniguruma
];
RUSTONIG_SYSTEM_LIBONIG = true;
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd zola \
--bash <($out/bin/zola completion bash) \
--fish <($out/bin/zola completion fish) \
--zsh <($out/bin/zola completion zsh)
'';
passthru.tests.version = testers.testVersion { package = zola; };
meta = {
description = "Fast static site generator with everything built-in";
mainProgram = "zola";
homepage = "https://www.getzola.org/";
changelog = "https://github.com/getzola/zola/raw/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
dandellion
dywedir
_0x4A6F
];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
zig_0_14,
nix,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "zon2nix";
version = "0.1.3-unstable-2025-03-20";
src = fetchFromGitHub {
owner = "nix-community";
repo = "zon2nix";
rev = "2360e358c2107860dadd340f88b25d260b538188";
hash = "sha256-89hYzrzQokQ+HUOd3g4epP9jdajaIoaMG81SrCNCqqU=";
};
nativeBuildInputs = [
zig_0_14.hook
];
zigBuildFlags = [
"-Dnix=${lib.getExe nix}"
];
zigCheckFlags = [
"-Dnix=${lib.getExe nix}"
];
meta = {
description = "Convert the dependencies in `build.zig.zon` to a Nix expression";
mainProgram = "zon2nix";
homepage = "https://github.com/nix-community/zon2nix";
changelog = "https://github.com/nix-community/zon2nix/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
figsoda
RossComputerGuy
];
inherit (zig_0_14.meta) platforms;
};
})

View File

@@ -0,0 +1,31 @@
From 8823e48b055b7e574c08069048ba21ffa4393699 Mon Sep 17 00:00:00 2001
From: Daniel Fullmer <danielrf12@gmail.com>
Date: Fri, 21 Feb 2020 21:52:00 -0500
Subject: [PATCH] Don't use file timestamp in cache filename
Every file in the nix store has a timestamp of "1", meaning that the
filename would remain constant even when changing zoneminder versions.
This would mean that newer versions would use the existing symlink to an
older version of the source file. We replace SRC_HASH in nix with a
hash of the source used to build zoneminder to ensure this filename is
unique.
---
web/includes/functions.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/web/includes/functions.php b/web/includes/functions.php
index 89d2cc8ad..52cbb6f38 100644
--- a/web/includes/functions.php
+++ b/web/includes/functions.php
@@ -1941,7 +1941,8 @@ function cache_bust($file) {
$parts = pathinfo($file);
global $css;
$dirname = str_replace('/', '_', $parts['dirname']);
- $cacheFile = $dirname.'_'.$parts['filename'].'-'.$css.'-'.filemtime($file).'.'.$parts['extension'];
+ $srcHash = '@srcHash@';
+ $cacheFile = $dirname.'_'.$parts['filename'].'-'.$css.'-'.$srcHash.'.'.$parts['extension'];
if ( file_exists(ZM_DIR_CACHE.'/'.$cacheFile) or symlink(ZM_PATH_WEB.'/'.$file, ZM_DIR_CACHE.'/'.$cacheFile) ) {
return 'cache/'.$cacheFile;
} else {
--
2.32.0

View File

@@ -0,0 +1,13 @@
diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
index fa7b86079..c9d3c6f6c 100644
--- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
+++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
@@ -877,7 +877,7 @@ our @options = (
},
{
name => 'ZM_HTTP_VERSION',
- default => '1.0',
+ default => '1.1',
description => 'The version of HTTP that ZoneMinder will use to connect',
help => q`
ZoneMinder can communicate with network cameras using either of

View File

@@ -0,0 +1,250 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchurl,
cmake,
makeWrapper,
pkg-config,
curl,
ffmpeg,
glib,
libjpeg,
libselinux,
libsepol,
mp4v2,
libmysqlclient,
mariadb,
pcre,
perl,
perlPackages,
polkit,
util-linuxMinimal,
x264,
zlib,
coreutils,
procps,
psmisc,
nixosTests,
}:
# NOTES:
#
# 1. ZM_CONFIG_DIR is set to $out/etc/zoneminder as the .conf file distributed
# by upstream contains defaults and is not supposed to be edited so it is fine
# to keep it read-only.
#
# 2. ZM_CONFIG_SUBDIR is where we place our configuration from the NixOS module
# but as the installer will try to put files there, we patch Config.pm after the
# install.
#
# 3. ZoneMinder is run with -T passed to the perl interpreter which makes perl
# ignore PERL5LIB. We therefore have to do the substitution into -I parameters
# ourselves which results in ugly wrappers.
#
# 4. The makefile for the perl modules needs patching to put things into the
# right place. That also means we have to not run "make install" for them.
#
# 5. In principal the various ZM_xx variables should be overridable from the
# config file but some of them are baked into the perl scripts, so we *have* to
# set them here instead of in the configuration in the NixOS module.
#
# 6. I am no PolicyKit expert but the .policy file looks fishy:
# a. The user needs to be known at build-time so we should probably throw
# upstream's policy file away and generate it from the NixOS module
# b. I *think* we may have to substitute the store paths with
# /run/current-system/sw/bin paths for it to work.
#
# 7. we manually fix up the perl paths in the scripts as fixupPhase will only
# handle pkexec and not perl if both are present.
#
# 8. There are several perl modules needed at runtime which are not checked when
# building so if a new version stops working, check if there is a missing
# dependency by running the failing component manually.
#
# 9. Parts of the web UI has a hardcoded /zm path so we create a symlink to work
# around it.
let
addons = [
{
path = "scripts/ZoneMinder/lib/ZoneMinder/Control/Xiaomi.pm";
src = fetchurl {
url = "https://gist.githubusercontent.com/joshstrange/73a2f24dfaf5cd5b470024096ce2680f/raw/e964270c5cdbf95e5b7f214f7f0fc6113791530e/Xiaomi.pm";
sha256 = "04n1ap8fx66xfl9q9rypj48pzbgzikq0gisfsfm8wdsmflarz43v";
};
}
];
user = "zoneminder";
dirName = "zoneminder";
perlBin = "${perl}/bin/perl";
in
stdenv.mkDerivation rec {
pname = "zoneminder";
version = "1.36.35";
src = fetchFromGitHub {
owner = "ZoneMinder";
repo = "zoneminder";
tag = version;
hash = "sha256-0mpT3qjF8zlcsd6OlNIvrabDsz+oJPPy9Vn2TQSuHAI=";
fetchSubmodules = true;
};
patches = [
./default-to-http-1dot1.patch
./0001-Don-t-use-file-timestamp-in-cache-filename.patch
];
postPatch = ''
rm -rf web/api/lib/Cake/Test
${lib.concatStringsSep "\n" (
map (e: ''
cp ${e.src} ${e.path}
'') addons
)}
for d in scripts/ZoneMinder onvif/{modules,proxy} ; do
substituteInPlace $d/CMakeLists.txt \
--replace 'DESTDIR="''${CMAKE_CURRENT_BINARY_DIR}/output"' "PREFIX=$out INSTALLDIRS=site"
sed -i '/^install/d' $d/CMakeLists.txt
done
substituteInPlace misc/CMakeLists.txt \
--replace '"''${PC_POLKIT_PREFIX}/''${CMAKE_INSTALL_DATAROOTDIR}' "\"$out/share"
for f in misc/*.policy.in \
scripts/*.pl* \
scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in ; do
substituteInPlace $f \
--replace '/usr/bin/perl' '${perlBin}' \
--replace '/bin:/usr/bin' "$out/bin:${
lib.makeBinPath [
coreutils
procps
psmisc
]
}"
done
substituteInPlace scripts/zmdbbackup.in \
--replace /usr/bin/mysqldump ${mariadb.client}/bin/mysqldump
substituteInPlace scripts/zmupdate.pl.in \
--replace "'mysql'" "'${mariadb.client}/bin/mysql'" \
--replace "'mysqldump'" "'${mariadb.client}/bin/mysqldump'"
for f in scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in \
scripts/zmupdate.pl.in \
src/zm_config_data.h.in \
web/api/app/Config/bootstrap.php.in \
web/includes/config.php.in ; do
substituteInPlace $f --replace @ZM_CONFIG_SUBDIR@ /etc/zoneminder
done
for f in includes/Event.php views/image.php ; do
substituteInPlace web/$f \
--replace "'ffmpeg " "'${ffmpeg}/bin/ffmpeg "
done
for f in scripts/ZoneMinder/lib/ZoneMinder/Event.pm \
scripts/ZoneMinder/lib/ZoneMinder/Storage.pm ; do
substituteInPlace $f \
--replace '/bin/rm' "${coreutils}/bin/rm"
done
substituteInPlace web/includes/functions.php \
--replace "'date " "'${coreutils}/bin/date " \
--subst-var-by srcHash "`basename $out`"
'';
buildInputs = [
curl
ffmpeg
glib
libjpeg
libselinux
libsepol
mp4v2
libmysqlclient
mariadb
pcre
perl
polkit
x264
zlib
util-linuxMinimal # for libmount
]
++ (with perlPackages; [
# build-time dependencies
DateManip
DBI
DBDmysql
LWP
SysMmap
# run-time dependencies not checked at build-time
ClassStdFast
DataDump
DeviceSerialPort
JSONMaybeXS
LWPProtocolHttps
NumberBytesHuman
SysCPU
SysMemInfo
TimeDate
CryptEksblowfish
DataEntropy # zmupdate.pl
]);
nativeBuildInputs = [
cmake
makeWrapper
pkg-config
];
cmakeFlags = [
"-DWITH_SYSTEMD=ON"
"-DZM_LOGDIR=/var/log/${dirName}"
"-DZM_RUNDIR=/run/${dirName}"
"-DZM_SOCKDIR=/run/${dirName}"
"-DZM_TMPDIR=/tmp/${dirName}"
"-DZM_CONFIG_DIR=${placeholder "out"}/etc/zoneminder"
"-DZM_WEB_USER=${user}"
"-DZM_WEB_GROUP=${user}"
];
passthru = {
inherit dirName;
tests = nixosTests.zoneminder;
};
postInstall = ''
PERL5LIB="$PERL5LIB''${PERL5LIB:+:}$out/${perl.libPrefix}"
perlFlags="-wT"
for i in $(IFS=$'\n'; echo $PERL5LIB | tr ':' "\n" | sort -u); do
perlFlags="$perlFlags -I$i"
done
mkdir -p $out/libexec
for f in $out/bin/*.pl ; do
mv $f $out/libexec/
makeWrapper ${perlBin} $f \
--prefix PATH : $out/bin \
--add-flags "$perlFlags $out/libexec/$(basename $f)"
done
ln -s $out/share/zoneminder/www $out/share/zoneminder/www/zm
'';
meta = with lib; {
description = "Video surveillance software system";
homepage = "https://zoneminder.com";
license = licenses.gpl3;
maintainers = [ ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchurl,
jdk11_headless,
makeWrapper,
nixosTests,
bash,
coreutils,
}:
let
# Latest supported LTS JDK for Zookeeper 3.9:
# https://zookeeper.apache.org/doc/r3.9.2/zookeeperAdmin.html#sc_requiredSoftware
jre = jdk11_headless;
in
stdenv.mkDerivation (finalAttrs: {
pname = "zookeeper";
version = "3.9.3";
src = fetchurl {
url = "mirror://apache/zookeeper/zookeeper-${finalAttrs.version}/apache-zookeeper-${finalAttrs.version}-bin.tar.gz";
hash = "sha512-1E2HDBaRZi778ai68YWckBuCDcX/Fjs26BvrJ7b7880xtfHwdWl+2q9tPnpMsMyS+STc/2SylO8T1TVYm9rxQw==";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R conf docs lib $out
mkdir -p $out/bin
cp -R bin/{zkCli,zkCleanup,zkEnv,zkServer,zkSnapShotToolkit,zkTxnLogToolkit}.sh $out/bin
patchShebangs $out/bin
substituteInPlace $out/bin/zkServer.sh \
--replace-fail /bin/echo ${coreutils}/bin/echo
for i in $out/bin/{zkCli,zkCleanup,zkServer,zkSnapShotToolkit,zkTxnLogToolkit}.sh; do
wrapProgram $i \
--set JAVA_HOME "${jre}" \
--prefix PATH : "${bash}/bin"
done
chmod -x $out/bin/zkEnv.sh
runHook postInstall
'';
passthru = {
tests = {
nixos = nixosTests.zookeeper;
};
inherit jre;
};
meta = {
homepage = "https://zookeeper.apache.org";
description = "Apache Zookeeper";
changelog = "https://zookeeper.apache.org/doc/r${finalAttrs.version}/releasenotes.html";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
nathan-gs
ztzg
];
platforms = lib.platforms.unix;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
};
})

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
jre,
openssl,
pkg-config,
# We depend on ZooKeeper for the Jute compiler.
zookeeper,
}:
stdenv.mkDerivation rec {
pname = "zookeeper_mt";
version = lib.getVersion zookeeper;
src = fetchurl {
url = "mirror://apache/zookeeper/${zookeeper.pname}-${version}/apache-${zookeeper.pname}-${version}.tar.gz";
hash = "sha512-eo/9yeSPbik+5f3g3uc//N0aTx5VS0KCzkA/+wn/FFtAmHwnLex1GZOoOlQwly4KU10Y+pgY1shKab/aigPSFg==";
};
sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-client/zookeeper-client-c";
nativeBuildInputs = [
autoreconfHook
pkg-config
jre
];
buildInputs = [
openssl
zookeeper
];
# Generate the C marshallers/unmarshallers for the Jute-encoded
# definitions.
preConfigure = ''
mkdir generated
cd generated
java -cp ${zookeeper}/lib/${zookeeper.pname}-jute-${version}.jar \
org.apache.jute.compiler.generated.Rcc -l c \
../../../zookeeper-jute/src/main/resources/zookeeper.jute
cd ..
'';
configureFlags = [
# We're not going to start test servers in the sandbox anyway.
"--without-cppunit"
];
meta = with lib; {
homepage = "https://zookeeper.apache.org";
description = "Apache Zookeeper";
license = licenses.asl20;
maintainers = with maintainers; [
commandodev
ztzg
];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,260 @@
{
stdenv,
lib,
fetchurl,
makeWrapper,
xar,
cpio,
callPackage,
nixosTests,
buildFHSEnv,
# Support pulseaudio by default
pulseaudioSupport ? true,
# Whether to support XDG portals at all
xdgDesktopPortalSupport ? (
plasma6XdgDesktopPortalSupport
|| lxqtXdgDesktopPortalSupport
|| gnomeXdgDesktopPortalSupport
|| hyprlandXdgDesktopPortalSupport
|| wlrXdgDesktopPortalSupport
|| xappXdgDesktopPortalSupport
),
# This is Plasma 6 (KDE) XDG portal support
plasma6XdgDesktopPortalSupport ? false,
# This is LXQT XDG portal support
lxqtXdgDesktopPortalSupport ? false,
# This is GNOME XDG portal support
gnomeXdgDesktopPortalSupport ? false,
# This is Hyprland XDG portal support
hyprlandXdgDesktopPortalSupport ? false,
# This is `wlroots` XDG portal support
wlrXdgDesktopPortalSupport ? false,
# This is Xapp XDG portal support, used for GTK and various Cinnamon/MATE/Xfce4 infrastructure.
xappXdgDesktopPortalSupport ? false,
# This function can be overridden to add in extra packages
targetPkgs ? pkgs: [ ],
# This list can be overridden to add in extra packages
# that are independent of the underlying package attrset
targetPkgsFixed ? [ ],
}:
let
inherit (stdenv.hostPlatform) system;
# Zoom versions are released at different times per platform and often with different versions.
# We write them on three lines like this (rather than using {}) so that the updater script can
# find where to edit them.
versions.aarch64-darwin = "6.6.0.64511";
versions.x86_64-darwin = "6.6.0.64511";
# This is the fallback version so that evaluation can produce a meaningful result.
versions.x86_64-linux = "6.6.0.4410";
srcs = {
aarch64-darwin = fetchurl {
url = "https://zoom.us/client/${versions.aarch64-darwin}/zoomusInstallerFull.pkg?archType=arm64";
name = "zoomusInstallerFull.pkg";
hash = "sha256-2GdiJ/2K3TDF6nvVaIBVLJHgasx1e22aS4rhP30L2/o=";
};
x86_64-darwin = fetchurl {
url = "https://zoom.us/client/${versions.x86_64-darwin}/zoomusInstallerFull.pkg";
hash = "sha256-td0EltgpfSGlyo9Pg/4qS8qUdELP+A97iY9z3g19MW8=";
};
x86_64-linux = fetchurl {
url = "https://zoom.us/client/${versions.x86_64-linux}/zoom_x86_64.pkg.tar.xz";
hash = "sha256-KTg6VO1GT/8ppXFevGDx0br9JGl9rdUtuBzHmnjiOuk=";
};
};
unpacked = stdenv.mkDerivation {
pname = "zoom";
version = versions.${system} or versions.x86_64-linux;
src = srcs.${system} or srcs.x86_64-linux;
dontUnpack = stdenv.hostPlatform.isLinux;
unpackPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
xar -xf $src
zcat < zoomus.pkg/Payload | cpio -i
'';
# Note: In order to uncover missing libraries
# on x86_64-linux, add "pkgs" to this file's arguments
# (at the top of this file), then add these attributes here:
# > buildInputs = linuxGetDependencies pkgs;
# > dontAutoPatchelf = true;
# > dontWrapQtApps = true;
# > preFixup = ''
# > addAutoPatchelfSearchPath $out/opt/zoom
# > autoPatchelf $out/opt/zoom/{cef,Qt,*.so*,aomhost,zoom,zopen,ZoomLauncher,ZoomWebviewHost}
# > '';
# ...and finally "pkgs.autoPatchelfHook"
# to `nativeBuildInputs` right below.
# Then build `zoom-us.unpacked`:
# `autoPatchelfHook` will report missing library files.
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
makeWrapper
xar
cpio
];
installPhase = ''
runHook preInstall
''
+ (
if stdenv.hostPlatform.isDarwin then
''
mkdir -p $out/Applications
cp -R zoom.us.app $out/Applications/
''
else
''
mkdir $out
tar -C $out -xf $src
mv $out/usr/* $out/
''
)
+ ''
runHook postInstall
'';
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
makeWrapper $out/Applications/zoom.us.app/Contents/MacOS/zoom.us $out/bin/zoom
'';
dontPatchELF = true;
passthru.updateScript = ./update.sh;
passthru.tests.startwindow = callPackage ./test.nix { };
passthru.tests.nixos-module = nixosTests.zoom-us;
meta = {
homepage = "https://zoom.us/";
changelog = "https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0061222";
description = "zoom.us video conferencing application";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
platforms = builtins.attrNames srcs;
maintainers = with lib.maintainers; [
philiptaron
ryan4yin
yarny
];
mainProgram = "zoom";
};
};
# linux definitions
linuxGetDependencies =
pkgs:
[
pkgs.alsa-lib
pkgs.at-spi2-atk
pkgs.at-spi2-core
pkgs.atk
pkgs.cairo
pkgs.coreutils
pkgs.cups
pkgs.dbus
pkgs.expat
pkgs.fontconfig
pkgs.freetype
pkgs.gdk-pixbuf
pkgs.glib
pkgs.glib.dev
pkgs.gtk3
pkgs.libGL
pkgs.libdrm
pkgs.libgbm
pkgs.libkrb5
pkgs.libxkbcommon
pkgs.nspr
pkgs.nss
pkgs.pango
pkgs.pciutils
pkgs.pipewire
pkgs.procps
pkgs.qt5.qt3d
pkgs.qt5.qtgamepad
pkgs.qt5.qtlottie
pkgs.qt5.qtmultimedia
pkgs.qt5.qtremoteobjects
pkgs.qt5.qtxmlpatterns
pkgs.stdenv.cc.cc
pkgs.udev
pkgs.util-linux
pkgs.wayland
pkgs.xorg.libX11
pkgs.xorg.libXcomposite
pkgs.xorg.libXdamage
pkgs.xorg.libXext
pkgs.xorg.libXfixes
pkgs.xorg.libXrandr
pkgs.xorg.libXrender
pkgs.xorg.libXtst
pkgs.xorg.libxcb
pkgs.xorg.libxshmfence
pkgs.xorg.xcbutilcursor
pkgs.xorg.xcbutilimage
pkgs.xorg.xcbutilkeysyms
pkgs.xorg.xcbutilrenderutil
pkgs.xorg.xcbutilwm
pkgs.zlib
]
++ lib.optionals pulseaudioSupport [
pkgs.libpulseaudio
pkgs.pulseaudio
]
++ lib.optional xdgDesktopPortalSupport pkgs.xdg-desktop-portal
++ lib.optional plasma6XdgDesktopPortalSupport pkgs.kdePackages.xdg-desktop-portal-kde
++ lib.optional lxqtXdgDesktopPortalSupport pkgs.lxqt.xdg-desktop-portal-lxqt
++ lib.optionals gnomeXdgDesktopPortalSupport [
pkgs.xdg-desktop-portal-gnome
pkgs.xdg-desktop-portal-gtk
]
++ lib.optional hyprlandXdgDesktopPortalSupport pkgs.xdg-desktop-portal-hyprland
++ lib.optional wlrXdgDesktopPortalSupport pkgs.xdg-desktop-portal-wlr
++ lib.optional xappXdgDesktopPortalSupport pkgs.xdg-desktop-portal-xapp
++ targetPkgs pkgs
++ targetPkgsFixed;
in
if !stdenv.hostPlatform.isLinux then
unpacked
else
# We add the `unpacked` zoom archive to the FHS env and also bind-mount its `/opt` directory.
# This should assist Zoom in finding all its files in the places where it expects them to be.
buildFHSEnv {
inherit (unpacked) pname version;
targetPkgs = pkgs: (linuxGetDependencies pkgs) ++ [ unpacked ];
extraPreBwrapCmds = "unset QT_PLUGIN_PATH";
extraBwrapArgs = [ "--ro-bind ${unpacked}/opt /opt" ];
runScript = "/opt/zoom/ZoomLauncher";
extraInstallCommands = ''
cp -Rt $out/ ${unpacked}/share
substituteInPlace \
$out/share/applications/Zoom.desktop \
--replace-fail Exec={/usr/bin/,}zoom
# Backwards compatibility: we also call it zoom-us
ln -s $out/bin/{zoom,zoom-us}
'';
passthru = unpacked.passthru // {
inherit unpacked;
};
inherit (unpacked) meta;
}

View File

@@ -0,0 +1,44 @@
{
lib,
xvfb-run,
zoom-us,
runCommand,
writeShellApplication,
xorg,
}:
let
testScript = writeShellApplication {
name = "zoom-us-test-script";
runtimeInputs = [
xorg.xwininfo
zoom-us
];
text = ''
function is_zoom_window_present {
echo
xwininfo -root -tree \
| sed 's/.*0x[0-9a-f]* \"\([^\"]*\)\".*/\1/; t; d' \
| tee window-names
grep -q "Zoom Workplace" window-names
}
# Don't let zoom eat all RAM, like it did, cf.
# https://github.com/NixOS/nixpkgs/issues/371488
prlimit --{as,data}=$((4*2**30)):$((4*2**30)) zoom-us &
for _ in {0..900} ; do
if is_zoom_window_present ; then
break
fi
sleep 1
done
# If libraries are missing, the window still appears,
# but then disappears again immediately; check for that also.
sleep 20
is_zoom_window_present
'';
};
in
runCommand "zoom-us-test" { buildInputs = [ xvfb-run ]; } ''
HOME=$PWD xvfb-run ${lib.getExe testScript}
touch ${placeholder "out"}
''

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts curl jq
set -eu -o pipefail
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
nixpkgs=$(realpath "$scriptDir"/../../../..)
echo >&2 "=== Obtaining version data from https://zoom.us/rest/download ..."
linux_data=$(curl -Ls 'https://zoom.us/rest/download?os=linux' | jq .result.downloadVO)
mac_data=$(curl -Ls 'https://zoom.us/rest/download?os=mac' | jq .result.downloadVO)
version_aarch64_darwin=$(jq -r .zoomArm64.version <<<"$mac_data")
version_x86_64_darwin=$(jq -r .zoom.version <<<"$mac_data")
version_x86_64_linux=$(jq -r .zoom.version <<<"$linux_data")
echo >&2 "=== Downloading packages and computing hashes..."
# We precalculate the hashes before calling update-source-version
# because it attempts to calculate each architecture's package's hash
# by running `nix-build --system <architecture> -A zoom-us.src` which
# causes cross compiling headaches; using nix-prefetch-url with
# hard-coded URLs is simpler. Keep these URLs in sync with the ones
# in package.nix where `srcs` is defined.
hash_aarch64_darwin=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_aarch64_darwin}/zoomusInstallerFull.pkg?archType=arm64"))
hash_x86_64_darwin=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_x86_64_darwin}/zoomusInstallerFull.pkg"))
hash_x86_64_linux=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_x86_64_linux}/zoom_x86_64.pkg.tar.xz"))
echo >&2 "=== Updating package.nix ..."
# update-source-version expects to be at the root of nixpkgs
(cd "$nixpkgs" && update-source-version zoom-us "$version_aarch64_darwin" $hash_aarch64_darwin --system=aarch64-darwin --version-key=versions.aarch64-darwin)
(cd "$nixpkgs" && update-source-version zoom-us "$version_x86_64_darwin" $hash_x86_64_darwin --system=x86_64-darwin --version-key=versions.x86_64-darwin)
(cd "$nixpkgs" && update-source-version zoom-us "$version_x86_64_linux" $hash_x86_64_linux --system=x86_64-linux --version-key=versions.x86_64-linux --source-key=unpacked.src)
echo >&2 "=== Done!"

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
perl,
expat,
fontconfig,
freetype,
xorg,
}:
# !!! assert freetype == xorg.freetype
stdenv.mkDerivation rec {
pname = "zoom";
version = "1.1.5";
src = fetchurl {
url = "https://www.logicalshift.co.uk/unix/zoom/zoom-${version}.tar.gz";
hash = "sha256-8pZ/HAVV341K6QRDUC0UzzO2rGW2AvSZ++Pp445V27w=";
};
buildInputs = [
perl
expat
fontconfig
freetype
xorg.libICE
xorg.libSM
xorg.libX11
xorg.libXext
xorg.libXrender
];
env.NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2 -fgnu89-inline";
meta = with lib; {
homepage = "https://www.logicalshift.co.uk/unix/zoom/";
description = "Player for Z-Code, TADS and HUGO stories or games";
longDescription = ''
Zoom is a player for Z-Code, TADS and HUGO stories or games. These are
usually text adventures ('interactive fiction'), and were first created
by Infocom with the Zork series of games. Throughout the 80's, Infocom
released many interactive fiction stories before their ambitions to enter
the database market finally brought them low.
'';
license = licenses.gpl3;
platforms = platforms.linux;
mainProgram = "zoom";
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "zopfli";
version = "1.0.3";
outputs = [
"out"
"lib"
"dev"
];
src = fetchFromGitHub {
owner = "google";
repo = "zopfli";
rev = "${pname}-${version}";
name = "${pname}-${version}-src";
sha256 = "0dr8n4j5nj2h9n208jns56wglw59gg4qm3s7c6y3hs75d0nnkhm4";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
];
# Fix the build with CMake 4.
#
# See: <https://github.com/google/zopfli/pull/207>
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail \
'cmake_minimum_required(VERSION 2.8.11)' \
'cmake_minimum_required(VERSION 3.10)'
'';
postInstall = ''
install -Dm444 -t $out/share/doc/zopfli ../README*
cp $src/src/zopfli/*.h $dev/include/
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "Very good, but slow, deflate or zlib compression";
longDescription = ''
Zopfli Compression Algorithm is a compression library programmed
in C to perform very good, but slow, deflate or zlib compression.
This library can only compress, not decompress. Existing zlib or
deflate libraries can decompress the data.
'';
platforms = platforms.unix;
license = licenses.asl20;
mainProgram = "zopfli";
maintainers = with maintainers; [
bobvanderlinden
edef
];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule (finalAttrs: {
pname = "zoraxy";
version = "3.2.5r2";
src = fetchFromGitHub {
owner = "tobychui";
repo = "zoraxy";
tag = "v${finalAttrs.version}";
hash = "sha256-O7Rzx62O0h3kK6+lMag+5totijJoobOKi8DNWT9sDjg=";
};
sourceRoot = "${finalAttrs.src.name}/src";
vendorHash = "sha256-Bl3FI8lodSV5kzHvM8GHbQsep0W8s2BG8IbGf2AahZc=";
checkFlags =
let
# Skip tests that require network access
skippedTests = [
"TestExtractIssuerNameFromPEM"
"TestReplaceLocationHost"
"TestReplaceLocationHostRelative"
"TestHandleTraceRoute"
"TestHandlePing"
"TestListTable"
"TestWriteAndRead"
"TestHTTP1p1KeepAlive"
"TestGetPluginListFromURL"
"TestUpdateDownloadablePluginList"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
meta = {
description = "General purpose HTTP reverse proxy and forwarding tool written in Go";
homepage = "https://zoraxy.arozos.com/";
changelog = "https://github.com/tobychui/zoraxy/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.agpl3Only;
maintainers = [ lib.maintainers.luftmensch-luftmensch ];
mainProgram = "zoraxy";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,131 @@
{
lib,
stdenv,
fetchurl,
wrapGAppsHook3,
makeDesktopItem,
alsa-lib,
atk,
cairo,
dbus-glib,
gdk-pixbuf,
glib,
gtk3,
libGL,
xorg,
libgbm,
pango,
pciutils,
}:
stdenv.mkDerivation rec {
pname = "zotero";
version = "7.0.0-beta.111+b4f6c050e";
src =
let
escapedVersion = lib.replaceStrings [ "+" ] [ "%2B" ] version;
in
fetchurl {
url = "https://download.zotero.org/client/beta/${escapedVersion}/Zotero-${escapedVersion}_linux-x86_64.tar.bz2";
hash = "sha256-pZsmS4gKCT8UAjz9IJg5C7n4kk7bWT/7H5ONF20CzPM=";
};
dontPatchELF = true;
nativeBuildInputs = [ wrapGAppsHook3 ];
libPath =
lib.makeLibraryPath [
alsa-lib
atk
cairo
dbus-glib
gdk-pixbuf
glib
gtk3
libGL
xorg.libX11
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXtst
xorg.libxcb
libgbm
pango
pciutils
]
+ ":"
+ lib.makeSearchPathOutput "lib" "lib" [ stdenv.cc.cc ];
desktopItem = makeDesktopItem {
name = "zotero";
exec = "zotero -url %U";
icon = "zotero";
comment = meta.description;
desktopName = "Zotero";
genericName = "Reference Management";
categories = [
"Office"
"Database"
];
startupNotify = true;
mimeTypes = [
"x-scheme-handler/zotero"
"text/plain"
];
};
installPhase = ''
runHook preInstall
# Copy package contents to the output directory
mkdir -p "$prefix/usr/lib/zotero-bin-${version}"
cp -r * "$prefix/usr/lib/zotero-bin-${version}"
mkdir -p "$out/bin"
ln -s "$prefix/usr/lib/zotero-bin-${version}/zotero" "$out/bin/"
# Install desktop file and icons
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications/
for size in 32 64 128; do
install -Dm444 icons/icon''${size}.png \
$out/share/icons/hicolor/''${size}x''${size}/apps/zotero.png
done
install -Dm444 icons/symbolic.svg \
$out/share/icons/hicolor/symbolic/apps/zotero-symbolic.svg
runHook postInstall
'';
postFixup = ''
for executable in \
zotero-bin plugin-container updater vaapitest \
minidump-analyzer glxtest
do
if [ -e "$out/usr/lib/zotero-bin-${version}/$executable" ]; then
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
"$out/usr/lib/zotero-bin-${version}/$executable"
fi
done
find . -executable -type f -exec \
patchelf --set-rpath "$libPath" \
"$out/usr/lib/zotero-bin-${version}/{}" \;
'';
meta = with lib; {
homepage = "https://www.zotero.org";
description = "Collect, organize, cite, and share your research sources";
mainProgram = "zotero";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.agpl3Only;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [
atila
justanotherariel
];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
nodejs,
}:
buildNpmPackage {
pname = "zotero-translation-server";
version = "unstable-2023-07-13";
src = fetchFromGitHub {
owner = "zotero";
repo = "translation-server";
rev = "cf96d57f4e2af66fee7df9bad00681b3f4ac7d77";
hash = "sha256-GJn7UAl0raVGzplvFzo4A0RUjNbyGt/YI2mt1UZIJv0=";
fetchSubmodules = true;
};
npmDepsHash = "sha256-JHoBxUybs1GGRxEVG5GgX2mOCplTgR5dcPjnR42SEbY=";
makeCacheWritable = true;
dontNpmBuild = true;
postInstall = ''
mkdir -p $out/bin/ $out/share/zotero-translation-server/
makeWrapper ${nodejs}/bin/node $out/bin/translation-server \
--add-flags "$out/lib/node_modules/translation-server/src/server.js"
ln -s $out/lib/node_modules/translation-server/config $out/share/zotero-translation-server/config
ln -s $out/lib/node_modules/translation-server/modules $out/share/zotero-translation-server/modules
'';
meta = with lib; {
description = "Node.js-based server to run Zotero translators";
homepage = "https://github.com/zotero/translation-server";
license = licenses.agpl3Only;
maintainers = [ ];
mainProgram = "translation-server";
};
}

View File

@@ -0,0 +1,33 @@
{
pname,
version,
meta,
stdenv,
fetchurl,
undmg,
}:
stdenv.mkDerivation rec {
inherit pname version meta;
src = fetchurl {
url = "https://download.zotero.org/client/release/${version}/Zotero-${version}.dmg";
hash = "sha256-DeiQbg8wMFHsJ/jlbGj3wdXrRsGLJ0tOyGRex2w43lU=";
};
sourceRoot = ".";
nativeBuildInputs = [ undmg ];
dontConfigure = true;
dontBuild = true;
dontFixup = true; # breaks notarization
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r Zotero.app $out/Applications
runHook postInstall
'';
}

View File

@@ -0,0 +1,130 @@
{
pname,
version,
meta,
lib,
stdenv,
fetchurl,
wrapGAppsHook3,
makeDesktopItem,
atk,
cairo,
dbus-glib,
gdk-pixbuf,
glib,
gtk3,
libGL,
libva,
xorg,
libgbm,
pango,
pciutils,
alsaSupport ? true,
alsa-lib,
jackSupport ? true,
libjack2,
pulseSupport ? true,
libpulseaudio,
sndioSupport ? true,
sndio,
}:
stdenv.mkDerivation rec {
inherit pname version meta;
src = fetchurl {
url = "https://download.zotero.org/client/release/${version}/Zotero-${version}_linux-x86_64.tar.bz2";
hash = "sha256-L2Mvi11X4YBU4ezHDJosl7qHClmzUwmghvXG8TChA8c=";
};
dontPatchELF = true;
nativeBuildInputs = [ wrapGAppsHook3 ];
libPath =
lib.makeLibraryPath (
[
atk
cairo
dbus-glib
gdk-pixbuf
glib
gtk3
libGL
libva
xorg.libX11
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXtst
xorg.libxcb
libgbm
pango
pciutils
]
++ lib.optional alsaSupport alsa-lib
++ lib.optional jackSupport libjack2
++ lib.optional pulseSupport libpulseaudio
++ lib.optional sndioSupport sndio
)
+ ":"
+ lib.makeSearchPathOutput "lib" "lib" [ stdenv.cc.cc ];
desktopItem = makeDesktopItem {
name = "zotero";
exec = "zotero -url %U";
icon = "zotero";
comment = meta.description;
desktopName = "Zotero";
genericName = "Reference Management";
categories = [
"Office"
"Database"
];
startupNotify = true;
mimeTypes = [
"x-scheme-handler/zotero"
"text/plain"
];
};
installPhase = ''
runHook preInstall
# Copy package contents to the output directory
mkdir -p "$prefix/usr/lib/zotero-bin-${version}"
cp -r * "$prefix/usr/lib/zotero-bin-${version}"
mkdir -p "$out/bin"
ln -s "$prefix/usr/lib/zotero-bin-${version}/zotero" "$out/bin/"
# Install desktop file and icons
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications/
for size in 32 64 128; do
install -Dm444 icons/icon''${size}.png \
$out/share/icons/hicolor/''${size}x''${size}/apps/zotero.png
done
install -Dm444 icons/symbolic.svg \
$out/share/icons/hicolor/symbolic/apps/zotero-symbolic.svg
runHook postInstall
'';
postFixup = ''
for executable in \
zotero-bin plugin-container updater vaapitest \
minidump-analyzer glxtest
do
if [ -e "$out/usr/lib/zotero-bin-${version}/$executable" ]; then
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
"$out/usr/lib/zotero-bin-${version}/$executable"
fi
done
find . -executable -type f -exec \
patchelf --set-rpath "$libPath" \
"$out/usr/lib/zotero-bin-${version}/{}" \;
'';
}

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
callPackage,
}:
let
pname = "zotero";
version = "7.0.20";
meta = {
homepage = "https://www.zotero.org";
description = "Collect, organize, cite, and share your research sources";
mainProgram = "zotero";
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
license = lib.licenses.agpl3Only;
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
maintainers = with lib.maintainers; [
atila
justanotherariel
];
};
in
if stdenv.hostPlatform.isDarwin then
callPackage ./darwin.nix { inherit pname version meta; }
else
callPackage ./linux.nix { inherit pname version meta; }

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
withFzf ? true,
fzf,
installShellFiles,
libiconv,
}:
rustPlatform.buildRustPackage rec {
pname = "zoxide";
version = "0.9.8";
src = fetchFromGitHub {
owner = "ajeetdsouza";
repo = "zoxide";
tag = "v${version}";
hash = "sha256-8hXoC3vyR08hN8MMojnAO7yIskg4FsEm28GtFfh5liI=";
};
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
postPatch = lib.optionalString withFzf ''
substituteInPlace src/util.rs \
--replace '"fzf"' '"${fzf}/bin/fzf"'
'';
cargoHash = "sha256-Nonid/5Jh0WIQV0G3fpmkW0bql6bvlcNJBMZ+6MTTPQ=";
postInstall = ''
installManPage man/man*/*
installShellCompletion --cmd zoxide \
--bash contrib/completions/zoxide.bash \
--fish contrib/completions/zoxide.fish \
--zsh contrib/completions/_zoxide
'';
meta = {
description = "Fast cd command that learns your habits";
homepage = "https://github.com/ajeetdsouza/zoxide";
changelog = "https://github.com/ajeetdsouza/zoxide/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [
ysndr
cole-h
SuperSandro2000
matthiasbeyer
ryan4yin
];
mainProgram = "zoxide";
};
}