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,89 @@
{
lib,
stdenv,
gccStdenv,
autoreconfHook,
autoconf-archive,
pkg-config,
fetchurl,
fetchFromGitHub,
openal,
enet,
SDL2,
curl,
gettext,
libiconv,
}:
let
version = "2.15.6";
musicVersion = lib.versions.majorMinor version;
music = stdenv.mkDerivation {
pname = "7kaa-music";
version = musicVersion;
src = fetchurl {
url = "https://www.7kfans.com/downloads/7kaa-music-${musicVersion}.tar.bz2";
hash = "sha256-sNdntuJXGaFPXzSpN0SoAi17wkr2YnW+5U38eIaVwcM=";
};
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
meta.license = lib.licenses.unfree;
};
in
gccStdenv.mkDerivation (finalAttrs: {
pname = "7kaa";
inherit version;
src = fetchFromGitHub {
owner = "the3dfxdude";
repo = "7kaa";
tag = "v${finalAttrs.version}";
hash = "sha256-kkM+kFQ+tGHS5NrVPeDMRWFQb7waESt8xOLfFGaGdgo=";
};
nativeBuildInputs = [
autoreconfHook
autoconf-archive
pkg-config
];
buildInputs = [
openal
enet
SDL2
curl
gettext
libiconv
];
preAutoreconf = ''
autoupdate
'';
hardeningDisable = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [
"stackprotector"
];
postInstall = ''
mkdir $out/share/7kaa/MUSIC
cp -R ${music}/MUSIC $out/share/7kaa/
cp ${music}/COPYING-Music.txt $out/share/7kaa/MUSIC
cp ${music}/COPYING-Music.txt $out/share/doc/7kaa
'';
# Multiplayer is auto-disabled for non-x86 system
meta = {
homepage = "https://www.7kfans.com";
description = "GPL release of the Seven Kingdoms with multiplayer (available only on x86 platforms)";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.x86_64 ++ lib.platforms.aarch64;
maintainers = with lib.maintainers; [ _1000101 ];
};
})

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
perl,
perlPackages,
makeWrapper,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "7z2hashcat";
version = "2.0";
src = fetchFromGitHub {
owner = "philsmd";
repo = "7z2hashcat";
rev = finalAttrs.version;
hash = "sha256-BmpO2VLcuUtQaN4qmLm0YQEfK5iE+2hw4k6uBbwcFS4=";
};
nativeBuildInputs = [
makeWrapper
];
buildInputs = [
perl
];
installPhase = ''
runHook preInstall
install -D 7z2hashcat.pl $out/bin/7z2hashcat
wrapProgram $out/bin/7z2hashcat \
--set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.CompressRawLzma ]}" \
runHook postInstall
'';
meta = {
changelog = "https://github.com/philsmd/7z2hashcat/releases/tag/${finalAttrs.version}";
description = "Extract hashcat hashes from password-protected .7z archives (and .sfx files)";
homepage = "https://github.com/philsmd/7z2hashcat";
license = lib.licenses.publicDomain;
mainProgram = "7z2hashcat";
maintainers = with lib.maintainers; [ emilytrau ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,182 @@
--- a/C/7zip_gcc_c.mak
+++ b/C/7zip_gcc_c.mak
@@ -106,7 +106,7 @@
endif
-LIB2 = -lOle32 -loleaut32 -luuid -ladvapi32 -lUser32 -lShell32
+LIB2 = -lole32 -loleaut32 -luuid -ladvapi32 -luser32 -lshell32
CFLAGS_EXTRA = -DUNICODE -D_UNICODE
# -Wno-delete-non-virtual-dtor
--- a/C/7zVersion.rc
+++ b/C/7zVersion.rc
@@ -5,7 +5,7 @@
#define MY_VFT_APP 0x00000001L
#define MY_VFT_DLL 0x00000002L
-// #include <WinVer.h>
+// #include <winver.h>
#ifndef MY_VERSION
#include "7zVersion.h"
--- a/C/Util/7zipInstall/resource.rc
+++ b/C/Util/7zipInstall/resource.rc
@@ -1,7 +1,7 @@
#include <windows.h>
// #include <winnt.h>
// #include <WinUser.h>
-#include <CommCtrl.h>
+#include <commctrl.h>
#define USE_COPYRIGHT_CR
#include "../../7zVersion.rc"
--- a/C/Util/7zipInstall/resource.rc.rej
+++ b/C/Util/7zipInstall/resource.rc.rej
@@ -0,0 +1,10 @@
+--- C/Util/7zipInstall/resource.rc
++++ C/Util/7zipInstall/resource.rc
+@@ -1,6 +1,6 @@
+ #include <winnt.h>
+ #include <WinUser.h>
+-#include <CommCtrl.h>
++#include <commctrl.h>
+
+ #define USE_COPYRIGHT_CR
+ #include "../../7zVersion.rc"
--- a/C/Util/7zipUninstall/resource.rc
+++ b/C/Util/7zipUninstall/resource.rc
@@ -1,7 +1,7 @@
#include <windows.h>
// #include <winnt.h>
// #include <WinUser.h>
-#include <CommCtrl.h>
+#include <commctrl.h>
#define USE_COPYRIGHT_CR
#include "../../7zVersion.rc"
--- a/C/Util/7zipUninstall/resource.rc.rej
+++ b/C/Util/7zipUninstall/resource.rc.rej
@@ -0,0 +1,10 @@
+--- C/Util/7zipUninstall/resource.rc
++++ C/Util/7zipUninstall/resource.rc
+@@ -1,6 +1,6 @@
+ #include <winnt.h>
+ #include <WinUser.h>
+-#include <CommCtrl.h>
++#include <commctrl.h>
+
+ #define USE_COPYRIGHT_CR
+ #include "../../7zVersion.rc"
--- a/CPP/7zip/7zip_gcc.mak
+++ b/CPP/7zip/7zip_gcc.mak
@@ -142,8 +142,8 @@
DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll
endif
-LIB2_GUI = -lOle32 -lGdi32 -lComctl32 -lComdlg32 -lShell32 $(LIB_HTMLHELP)
-LIB2 = -loleaut32 -luuid -ladvapi32 -lUser32 $(LIB2_GUI)
+LIB2_GUI = -lole32 -lgdi32 -lcomctl32 -lcomdlg32 -lshell32 $(LIB_HTMLHELP)
+LIB2 = -loleaut32 -luuid -ladvapi32 -luser32 $(LIB2_GUI)
# v24.00: -DUNICODE and -D_UNICODE are defined in precompilation header files
# CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE
--- a/CPP/7zip/Crypto/RandGen.cpp
+++ b/CPP/7zip/Crypto/RandGen.cpp
@@ -19,7 +19,7 @@
#ifdef USE_STATIC_RtlGenRandom
-// #include <NTSecAPI.h>
+// #include <ntsecapi.h>
EXTERN_C_BEGIN
#ifndef RtlGenRandom
--- a/CPP/7zip/GuiCommon.rc
+++ b/CPP/7zip/GuiCommon.rc
@@ -4,7 +4,7 @@
// #include <WinUser.h>
// for Windows CE:
-#include <CommCtrl.h>
+#include <commctrl.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
--- a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
+++ b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <TlHelp32.h>
+#include <tlhelp32.h>
#include "../../../Common/IntToString.h"
--- a/CPP/7zip/UI/FileManager/SysIconUtils.h
+++ b/CPP/7zip/UI/FileManager/SysIconUtils.h
@@ -5,7 +5,7 @@
#include "../../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../../../Common/MyString.h"
--- a/CPP/Windows/Control/ComboBox.h
+++ b/CPP/Windows/Control/ComboBox.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
--- a/CPP/Windows/Control/ImageList.h
+++ b/CPP/Windows/Control/ImageList.h
@@ -3,7 +3,7 @@
#ifndef ZIP7_INC_WINDOWS_CONTROL_IMAGE_LIST_H
#define ZIP7_INC_WINDOWS_CONTROL_IMAGE_LIST_H
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Defs.h"
--- a/CPP/Windows/Control/ListView.h
+++ b/CPP/Windows/Control/ListView.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
--- a/CPP/Windows/Control/ProgressBar.h
+++ b/CPP/Windows/Control/ProgressBar.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
--- a/CPP/Windows/SecurityUtils.h
+++ b/CPP/Windows/SecurityUtils.h
@@ -3,7 +3,7 @@
#ifndef ZIP7_INC_WINDOWS_SECURITY_UTILS_H
#define ZIP7_INC_WINDOWS_SECURITY_UTILS_H
-#include <NTSecAPI.h>
+#include <ntsecapi.h>
#include "Defs.h"

View File

@@ -0,0 +1,148 @@
{
stdenv,
lib,
fetchzip,
# Only useful on Linux x86/x86_64, and brings in nonfree Open Watcom
uasm,
useUasm ? false,
# RAR code is under non-free unRAR license
# see the meta.license section below for more details
enableUnfree ? false,
# For tests
testers,
}:
let
makefile =
{
aarch64-darwin = "../../cmpl_mac_arm64.mak";
x86_64-darwin = "../../cmpl_mac_x64.mak";
aarch64-linux = "../../cmpl_gcc_arm64.mak";
i686-linux = "../../cmpl_gcc_x86.mak";
x86_64-linux = "../../cmpl_gcc_x64.mak";
}
.${stdenv.hostPlatform.system} or "../../cmpl_gcc.mak"; # generic build
in
stdenv.mkDerivation (finalAttrs: {
pname = "7zz";
version = "25.01";
src = fetchzip {
url = "https://7-zip.org/a/7z${lib.replaceStrings [ "." ] [ "" ] finalAttrs.version}-src.tar.xz";
hash =
{
free = "sha256-A1BBdSGepobpguzokL1zpjce5EOl0zqABYciv9zCOac=";
unfree = "sha256-Jkj6T4tMols33uyJSOCcVmxh5iBYYCO/rq9dF4NDMko=";
}
.${if enableUnfree then "unfree" else "free"};
stripRoot = false;
# remove the unRAR related code from the src drv
# > the license requires that you agree to these use restrictions,
# > or you must remove the software (source and binary) from your hard disks
# https://fedoraproject.org/wiki/Licensing:Unrar
postFetch = lib.optionalString (!enableUnfree) ''
rm -r $out/CPP/7zip/Compress/Rar*
'';
};
patches = [
./fix-cross-mingw-build.patch
];
postPatch = lib.optionalString stdenv.hostPlatform.isMinGW ''
substituteInPlace CPP/7zip/7zip_gcc.mak C/7zip_gcc_c.mak \
--replace windres.exe ${stdenv.cc.targetPrefix}windres
'';
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.hostPlatform.isDarwin [
"-Wno-deprecated-copy-dtor"
]
++ lib.optionals stdenv.hostPlatform.isMinGW [
"-Wno-conversion"
"-Wno-unused-macros"
]
++ lib.optionals stdenv.cc.isClang [
"-Wno-declaration-after-statement"
(lib.optionals (lib.versionAtLeast (lib.getVersion stdenv.cc.cc) "13") [
"-Wno-reserved-identifier"
"-Wno-unused-but-set-variable"
])
(lib.optionals (lib.versionAtLeast (lib.getVersion stdenv.cc.cc) "16") [
"-Wno-unsafe-buffer-usage"
"-Wno-cast-function-type-strict"
])
# These three probably started to appear with clang 20 or 21:
"-Wno-c++-keyword"
"-Wno-implicit-void-ptr-cast"
"-Wno-nrvo"
]
);
inherit makefile;
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CXX=${stdenv.cc.targetPrefix}c++"
]
++ lib.optionals useUasm [ "MY_ASM=uasm" ]
++ lib.optionals (!useUasm && stdenv.hostPlatform.isx86) [ "USE_ASM=" ]
# it's the compression code with the restriction, see DOC/License.txt
++ lib.optionals (!enableUnfree) [ "DISABLE_RAR_COMPRESS=true" ]
++ lib.optionals (stdenv.hostPlatform.isMinGW) [
"IS_MINGW=1"
"MSYSTEM=1"
];
nativeBuildInputs = lib.optionals useUasm [ uasm ];
setupHook = ./setup-hook.sh;
enableParallelBuilding = true;
preBuild = "cd CPP/7zip/Bundles/Alone2";
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin b/*/7zz${stdenv.hostPlatform.extensions.executable}
install -Dm444 -t $out/share/doc/7zz ../../../../DOC/*.txt
runHook postInstall
'';
passthru = {
updateScript = ./update.sh;
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "7zz --help";
};
};
meta = {
description = "Command line archiver utility";
homepage = "https://7-zip.org";
license =
with lib.licenses;
# 7zip code is largely lgpl2Plus
# CPP/7zip/Compress/LzfseDecoder.cpp is bsd3
[
lgpl2Plus # and
bsd3
]
++
# and CPP/7zip/Compress/Rar* are unfree with the unRAR license restriction
# the unRAR compression code is disabled by default
lib.optionals enableUnfree [ unfree ];
maintainers = with lib.maintainers; [
anna328p
jk
peterhoeg
];
platforms = with lib.platforms; unix ++ windows;
mainProgram = "7zz";
};
})

View File

@@ -0,0 +1,5 @@
unpackCmdHooks+=(_tryUnpackDmg)
_tryUnpackDmg() {
if ! [[ "$curSrc" =~ \.dmg$ ]]; then return 1; fi
7zz x "$curSrc"
}

15
pkgs/by-name/_7/_7zz/update.sh Executable file
View File

@@ -0,0 +1,15 @@
#! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=./. -i bash -p curl xq-xml common-updater-scripts
set -euo pipefail
OLD_VERSION="$(nix-instantiate --eval --json --expr 'let pkgs = import ./. {}; in pkgs._7zz.version' | sed 's/"//g')"
NEW_VERSION="$(curl -H 'Accept: application/rss+xml' 'https://sourceforge.net/projects/sevenzip/rss?path=/7-Zip' | xq -x "substring((/rss/channel/item[link[contains(., 'src.tar.xz')]])[1]/title, 8, 5)")"
echo "comparing versions $OLD_VERSION => $NEW_VERSION"
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
echo "Already up to date! Doing nothing"
exit 0
fi
update-source-version _7zz "$NEW_VERSION"
update-source-version _7zz-rar "$NEW_VERSION" --ignore-same-version