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,94 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
updateAutotoolsGnuConfigScriptsHook,
libintl,
aclSupport ? lib.meta.availableOn stdenv.hostPlatform acl,
acl,
}:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
stdenv.mkDerivation rec {
pname = "gnutar";
version = "1.35";
src = fetchurl {
url = "mirror://gnu/tar/tar-${version}.tar.xz";
sha256 = "sha256-TWL/NzQux67XSFNTI5MMfPlKz3HDWRiCsmp+pQ8+3BY=";
};
# GNU tar fails to link libiconv even though the configure script detects it.
# https://savannah.gnu.org/bugs/index.php?64441
patches = [ ./link-libiconv.patch ];
# gnutar tries to call into gettext between `fork` and `exec`,
# which is not safe on darwin.
# see http://article.gmane.org/gmane.os.macosx.fink.devel/21882
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace src/system.c --replace '_(' 'N_('
'';
outputs = [
"out"
"info"
];
nativeBuildInputs = [ autoreconfHook ];
# Add libintl on Darwin specifically as it fails to link (or skip)
# NLS on it's own:
# "_libintl_textdomain", referenced from:
# _main in tar.o
# ld: symbol(s) not found for architecture x86_64
buildInputs = lib.optional aclSupport acl ++ lib.optional stdenv.hostPlatform.isDarwin libintl;
# May have some issues with root compilation because the bootstrap tool
# cannot be used as a login shell for now.
FORCE_UNSAFE_CONFIGURE = lib.optionalString (
stdenv.hostPlatform.system == "armv7l-linux" || stdenv.hostPlatform.isSunOS
) "1";
preConfigure =
if stdenv.hostPlatform.isCygwin then
''
sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
''
else
null;
doCheck = false; # fails
doInstallCheck = false; # fails
meta = {
description = "GNU implementation of the `tar' archiver";
longDescription = ''
The Tar program provides the ability to create tar archives, as
well as various other kinds of manipulation. For example, you
can use Tar on previously created archives to extract files, to
store additional files, or to update or list files which were
already stored.
Initially, tar archives were used to store files conveniently on
magnetic tape. The name "Tar" comes from this use; it stands
for tape archiver. Despite the utility's name, Tar can direct
its output to available devices, files, or other programs (using
pipes), it can even access remote devices or files (as
archives).
'';
homepage = "https://www.gnu.org/software/tar/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ RossComputerGuy ];
mainProgram = "tar";
platforms = lib.platforms.all;
priority = 10;
};
}

View File

@@ -0,0 +1,23 @@
From 8632df398b2f548465ebe68b8f494c0d6f8d913d Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Tue, 18 Jul 2023 17:02:23 +0300
Subject: Fix savannah bug #64441
* src/Makefile.am (tar_LDADD): Add libiconv libraries.
---
src/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 36c9543..e2ec58d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,4 +52,5 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
tar_LDADD = $(LIBS) ../lib/libtar.a ../gnu/libgnu.a\
$(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\
$(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\
- $(LIB_SELINUX) $(LIB_SETLOCALE_NULL)
+ $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \
+ $(LIBINTL) $(LIBICONV)
--
cgit v1.1

View File

@@ -0,0 +1,98 @@
{
lib,
stdenv,
fetchFromGitHub,
enableUnfree ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "p7zip";
version = "17.06";
src = fetchFromGitHub {
owner = "p7zip-project";
repo = "p7zip";
rev = "v${finalAttrs.version}";
sha256 =
{
free = "sha256-NHlacZFal4xMYyFMshibeAw86cS1RXXyXweXKFHQAT8=";
unfree = "sha256-kSJHgnuUxO9DJwSOE1hffp9PfU39V+VE87I3CpeRGiY=";
}
.${if enableUnfree then "unfree" else "free"};
# 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*
find $out -name makefile'*' -exec sed -i '/Rar/d' {} +
'';
};
# Default makefile is full of impurities on Darwin. The patch doesn't hurt Linux so I'm leaving it unconditional
postPatch = ''
sed -i '/CC=\/usr/d' makefile.macosx_llvm_64bits
# Avoid writing timestamps into compressed manpages
# to maintain determinism.
substituteInPlace install.sh --replace 'gzip' 'gzip -n'
chmod +x install.sh
# I think this is a typo and should be CXX? Either way let's kill it
sed -i '/XX=\/usr/d' makefile.macosx_llvm_64bits
''
+ lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace makefile.machine \
--replace 'CC=gcc' 'CC=${stdenv.cc.targetPrefix}gcc' \
--replace 'CXX=g++' 'CXX=${stdenv.cc.targetPrefix}g++'
'';
preConfigure = ''
buildFlags=all3
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
cp makefile.macosx_llvm_64bits makefile.machine
'';
enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
makeFlags = [
"DEST_BIN=${placeholder "out"}/bin"
"DEST_SHARE=${placeholder "lib"}/lib/p7zip"
"DEST_MAN=${placeholder "man"}/share/man"
"DEST_SHARE_DOC=${placeholder "doc"}/share/doc/p7zip"
];
outputs = [
"out"
"lib"
"doc"
"man"
];
setupHook = ./setup-hook.sh;
passthru.updateScript = ./update.sh;
meta = with lib; {
homepage = "https://github.com/p7zip-project/p7zip";
description = "New p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/p7zip/)";
license =
with licenses;
# p7zip 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 maintainers; [
raskin
jk
];
platforms = platforms.unix;
mainProgram = "7z";
};
})

View File

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

View File

@@ -0,0 +1,47 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils gnused curl jq
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
DRV_DIR="$PWD"
OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
NEW_VERSION="$(curl https://api.github.com/repos/p7zip-project/p7zip/releases/latest | jq .tag_name -r | tr -d 'v')"
echo "comparing versions $OLD_VERSION => $NEW_VERSION"
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
echo "Already up to date! Doing nothing"
exit 0
fi
NIXPKGS_ROOT="$(realpath "$DRV_DIR/../../../..")"
echo "getting free source hash"
OLD_FREE_HASH="$(nix-instantiate --eval --strict -E "with import $NIXPKGS_ROOT {}; p7zip.src.drvAttrs.outputHash" | tr -d '"')"
echo "getting unfree source hash"
OLD_UNFREE_HASH="$(nix-instantiate --eval --strict -E "with import $NIXPKGS_ROOT {}; (p7zip.override { enableUnfree = true; }).src.drvAttrs.outputHash" | tr -d '"')"
NEW_FREE_HASH=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "p7zip.src" --rev "v$NEW_VERSION")
NEW_UNFREE_OUT=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "(p7zip.override { enableUnfree = true; }).src" --rev "v$NEW_VERSION" --output raw --print-path)
# first line of raw output is the hash
NEW_UNFREE_HASH="$(echo "$NEW_UNFREE_OUT" | sed -n 1p)"
# second line of raw output is the src path
NEW_UNFREE_SRC="$(echo "$NEW_UNFREE_OUT" | sed -n 2p)"
# make sure to nuke the unfree src from the updater's machine
# > 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
nix-store --delete "$NEW_UNFREE_SRC"
echo "updating version"
sed -i "s/version = \"$OLD_VERSION\";/version = \"$NEW_VERSION\";/" "$DRV_DIR/default.nix"
echo "updating free hash"
sed -i "s@free = \"$OLD_FREE_HASH\";@free = \"$NEW_FREE_HASH\";@" "$DRV_DIR/default.nix"
echo "updating unfree hash"
sed -i "s@unfree = \"$OLD_UNFREE_HASH\";@unfree = \"$NEW_UNFREE_HASH\";@" "$DRV_DIR/default.nix"
echo "done"

View File

@@ -0,0 +1,117 @@
{
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
gnustep-base,
bzip2,
zlib,
icu,
openssl,
wavpack,
xcbuildHook,
}:
stdenv.mkDerivation rec {
pname = "unar";
version = "1.10.8";
srcs = [
(fetchFromGitHub rec {
owner = "MacPaw";
repo = "XADMaster";
name = repo;
rev = "v${version}";
hash = "sha256-dmIyxpa3pq4ls4Grp0gy/6ZjcaA7rmobMn4h1inVgns=";
})
(fetchFromGitHub {
owner = "MacPaw";
repo = "universal-detector";
name = "UniversalDetector";
rev = "1.1";
hash = "sha256-6X1HtXhRuRwBOq5TAtL1I/vBBZokZOXIQ+oaRFigtv8=";
})
];
postPatch = ''
substituteInPlace unar.m lsar.m \
--replace-fail "v1.10.7" "v${version}"
''
+ (
if stdenv.hostPlatform.isDarwin then
''
substituteInPlace "./XADMaster.xcodeproj/project.pbxproj" \
--replace "libstdc++.6.dylib" "libc++.1.dylib"
''
else
''
for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do
substituteInPlace $f \
--replace "= gcc" "=${stdenv.cc.targetPrefix}cc" \
--replace "= g++" "=${stdenv.cc.targetPrefix}c++" \
--replace "-DGNU_RUNTIME=1" "" \
--replace "-fgnu-runtime" "-fobjc-runtime=gnustep-2.0"
done
# we need to build inside this directory as well, so we have to make it writeable
chmod +w ../UniversalDetector -R
''
);
buildInputs = [
bzip2
icu
openssl
wavpack
zlib
]
++ lib.optionals stdenv.hostPlatform.isLinux [ gnustep-base ];
nativeBuildInputs = [
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuildHook ];
xcbuildFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"-target unar"
"-target lsar"
"-configuration Release"
"MACOSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}"
];
makefile = lib.optionalString (!stdenv.hostPlatform.isDarwin) "Makefile.linux";
enableParallelBuilding = true;
dontConfigure = true;
sourceRoot = "XADMaster";
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin ${lib.optionalString stdenv.hostPlatform.isDarwin "Products/Release/"}{lsar,unar}
for f in lsar unar; do
installManPage ./Extra/$f.?
installShellCompletion --bash --name $f ./Extra/$f.bash_completion
done
runHook postInstall
'';
meta = with lib; {
homepage = "https://theunarchiver.com";
description = "Archive unpacker program";
longDescription = ''
The Unarchiver is an archive unpacker program with support for the popular
zip, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE, ISO, BIN,
and split file formats, as well as the old Stuffit, Stuffit X, DiskDouble,
Compact Pro, Packit, cpio, compress (.Z), ARJ, ARC, PAK, ACE, ZOO, LZH,
ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats.
'';
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ peterhoeg ];
mainProgram = "unar";
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
buildPythonApplication,
fetchFromGitHub,
unar,
}:
buildPythonApplication rec {
pname = "unrar-wrapper";
version = "1.0.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "openSUSE";
repo = "unrar_wrapper";
rev = "unrar_wrapper-${version}";
sha256 = "sha256-HjrUif8MrbtLjRQMAPZ/Y2o43rGSDj0HHY4fZQfKz5w=";
};
makeWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [ unar ]}"
];
postFixup = ''
ln -s $out/bin/unrar_wrapper $out/bin/unrar
rm -rf $out/nix-support/propagated-build-inputs
'';
setupHook = ./setup-hook.sh;
meta = with lib; {
homepage = "https://github.com/openSUSE/unrar_wrapper";
description = "Backwards compatibility between unar and unrar";
longDescription = ''
unrar_wrapper is a wrapper python script that transforms the basic UnRAR commands
to unar and lsar calls in order to provide a backwards compatibility.
'';
license = licenses.gpl3Only;
platforms = platforms.unix;
maintainers = with maintainers; [ artturin ];
};
}

View File

@@ -0,0 +1,5 @@
unpackCmdHooks+=(_tryUnrar)
_tryUnrar() {
if ! [[ "$curSrc" =~ \.rar$ ]]; then return 1; fi
unrar x "$curSrc" >/dev/null
}