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,43 @@
{
lib,
stdenvNoCC,
fetchzip,
xorg,
}:
stdenvNoCC.mkDerivation rec {
pname = "anakron";
version = "0.3.3";
src = fetchzip {
url = "https://github.com/molarmanful/ANAKRON/releases/download/v${version}/ANAKRON-release_v${version}.zip";
hash = "sha256-l4MA3OsMnqPIBWKx3ZO5XnxjE0gnIGyAtsZe2z/9zrw=";
};
nativeBuildInputs = [ xorg.mkfontscale ];
installPhase = ''
runHook preInstall
misc="$out/share/fonts/misc"
install -D -m 644 *.{bdf,otb,pcf} -t "$misc"
install -D -m 644 *.psfu -t "$out/share/consolefonts"
install -D -m 644 *.ttf -t "$out/share/fonts/truetype"
# create fonts.dir so NixOS xorg module adds to fp
mkfontdir "$misc"
runHook postInstall
'';
meta = {
description = "Thicc retrofuturistic bitmap font made for the modern screen";
homepage = "https://github.com/molarmanful/ANAKRON";
changelog = "https://github.com/molarmanful/ANAKRON/releases/tag/v${version}";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
ejiektpobehuk
];
};
}

View File

@@ -0,0 +1,57 @@
{
stdenv,
lib,
fetchFromGitHub,
bzip2,
gd,
libjpeg,
libpng,
}:
stdenv.mkDerivation rec {
pname = "analog";
version = "6.0.18";
src = fetchFromGitHub {
owner = "c-amie";
repo = "analog-ce";
tag = version;
sha256 = "sha256-NCturEibnpl6+paUZezksHzP33WtAzfIolvBLeEHXjY=";
};
buildInputs = [
bzip2
gd
libjpeg
libpng
];
postPatch = ''
sed -i src/anlghead.h \
-e "s|#define DEFAULTCONFIGFILE .*|#define DEFAULTCONFIGFILE \"$out/etc/analog.cfg\"|g" \
-e "s|#define LANGDIR .*|#define LANGDIR \"$out/share/${pname}/lang/\"|g"
substituteInPlace src/Makefile \
--replace-fail "gcc" "${stdenv.cc.targetPrefix}cc" \
--replace-fail "LIBS = -lm" "LIBS = -lm -lpng -lgd -ljpeg -lz -lbz2" \
--replace-fail "DEFS =" "DEFS = -DHAVE_GD -DHAVE_ZLIB -DHAVE_BZLIB"
'';
installPhase = ''
mkdir -p $out/bin $out/etc $out/share/doc/$pname $out/share/man/man1 $out/share/$pname
mv analog $out/bin/
cp examples/big.cfg $out/etc/analog.cfg
mv analog.man $out/share/man/man1/analog.1
mv docs $out/share/doc/$pname/manual
mv how-to $out/share/doc/$pname/
mv lang images examples $out/share/$pname/
'';
meta = {
homepage = "https://www.c-amie.co.uk/software/analog/";
license = lib.licenses.gpl2Only;
description = "Powerful tool to generate web server statistics";
platforms = lib.platforms.all;
mainProgram = "analog";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
llvmPackages,
python3,
}:
let
inherit (llvmPackages) clang-unwrapped;
in
python3.pkgs.buildPythonApplication rec {
pname = "analyze-build";
inherit (clang-unwrapped) version;
format = "other";
src = clang-unwrapped + "/bin";
dontUnpack = true;
dependencies = with python3.pkgs; [
libscanbuild
];
installPhase = ''
mkdir -p "$out/bin"
install "$src/analyze-build" "$out/bin/"
'';
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [ clang-unwrapped ])
];
meta = {
description = "run Clang static analyzer against a project with compilation database";
homepage = "https://github.com/llvm/llvm-project/tree/llvmorg-${version}/clang/tools/scan-build-py/";
mainProgram = "scan-build";
license = with lib.licenses; [
asl20
llvm-exception
];
maintainers = with lib.maintainers; [ RossSmyth ];
platforms = lib.intersectLists python3.meta.platforms clang-unwrapped.meta.platforms;
};
}

View File

@@ -0,0 +1,16 @@
diff --git a/src/worker.cpp b/src/worker.cpp
index 0cf8955..b9dc70f 100644
--- a/src/worker.cpp
+++ b/src/worker.cpp
@@ -29,7 +29,10 @@ void Worker::work(const std::stop_token &stop_token) {
while (!stop_token.stop_requested()) {
while ((proc = process_queue->poll(500ms)).has_value()) {
const auto &p = proc.value();
- const auto &rule = rules->get_rule(p.name);
+ auto name = p.name;
+ if (name.starts_with('.') && name.ends_with("-wrapped"))
+ name = name.substr(1, name.find_last_of('-') - 1);
+ const auto &rule = rules->get_rule(name);
processed_count++;

View File

@@ -0,0 +1,111 @@
{
lib,
clangStdenv,
fetchFromGitLab,
fetchpatch,
cmake,
pkg-config,
spdlog,
nlohmann_json,
systemd,
libbpf,
elfutils,
bpftools,
pcre2,
zlib,
withBpf ? true,
}:
clangStdenv.mkDerivation (finalAttrs: {
pname = "ananicy-cpp";
version = "1.1.1";
src = fetchFromGitLab {
owner = "ananicy-cpp";
repo = "ananicy-cpp";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-oPinSc00+Z6SxjfTh7DttcXSjsLv1X0NI+O37C8M8GY=";
};
patches = [
./match-wrappers.patch
# FIXME: remove these when updating to next stable release
(fetchpatch {
name = "allow-regex-pattern-matching.patch";
url = "https://gitlab.com/ananicy-cpp/ananicy-cpp/-/commit/6ea2dccceec39b6c4913f617dad81d859aa20f24.patch";
hash = "sha256-C+7x/VpVwewXEPwibi7GxGfjuhDkhcjTyGbZHlYL2Bs=";
})
(fetchpatch {
name = "use-a-reliable-path-for-mounts-file.patch";
url = "https://gitlab.com/ananicy-cpp/ananicy-cpp/-/commit/de6f11978db98bfd13a1e87dcdab61dbe6496710.patch";
hash = "sha256-9bJlFCClddlAEknfqp7Gcij7NX6tqohE2wqoalLoN5I=";
})
# https://gitlab.com/ananicy-cpp/ananicy-cpp/-/merge_requests/30
(fetchpatch {
name = "fix-build-with-clang-19.patch";
url = "https://gitlab.com/ananicy-cpp/ananicy-cpp/-/commit/b2589a9b1faa2ecf54aeede40ea781c33bfb09a8.patch";
hash = "sha256-nfyCdhvnWj446z5aPFCXGi79Xgja8W0Eopl6I30fOBM=";
})
];
strictDeps = true;
nativeBuildInputs = [
cmake
pkg-config
]
++ lib.optionals withBpf [
bpftools
];
buildInputs = [
pcre2
spdlog
nlohmann_json
systemd
zlib
]
++ lib.optionals withBpf [
libbpf
elfutils
];
# BPF A call to built-in function '__stack_chk_fail' is not supported.
hardeningDisable = [
"stackprotector"
"zerocallusedregs"
];
cmakeFlags = [
(lib.mapAttrsToList lib.cmakeBool {
"USE_EXTERNAL_JSON" = true;
"USE_EXTERNAL_SPDLOG" = true;
"USE_EXTERNAL_FMTLIB" = true;
"USE_BPF_PROC_IMPL" = withBpf;
"BPF_BUILD_LIBBPF" = false;
"ENABLE_SYSTEMD" = true;
"ENABLE_REGEX_SUPPORT" = true;
})
(lib.cmakeFeature "VERSION" finalAttrs.version)
];
postInstall = ''
rm -rf "$out"/include
rm -rf "$out"/lib/cmake
'';
meta = {
homepage = "https://gitlab.com/ananicy-cpp/ananicy-cpp";
description = "Rewrite of ananicy in c++ for lower cpu and memory usage";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
artturin
johnrtitor
diniamo
];
mainProgram = "ananicy-cpp";
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
unstableGitUpdater,
}:
stdenvNoCC.mkDerivation {
pname = "ananicy-rules-cachyos";
version = "0-unstable-2025-09-09";
src = fetchFromGitHub {
owner = "CachyOS";
repo = "ananicy-rules";
rev = "0f5d7883cc4c49b8e9c51d5512ba145b5289eb05";
hash = "sha256-8zzUp1am6nu/6EnQkPTDkd/TLb2SBgSSyNpUyv44Zr8=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/etc/ananicy.d
rm README.md LICENSE
cp -r * $out/etc/ananicy.d
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater {
hardcodeZeroVersion = true;
};
meta = {
homepage = "https://github.com/CachyOS/ananicy-rules";
description = "CachyOS' ananicy-rules meant to be used with ananicy-cpp";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
artturin
johnrtitor
];
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
python3,
fetchFromGitHub,
makeWrapper,
schedtool,
sysctl,
util-linux,
fetchpatch,
}:
stdenv.mkDerivation {
pname = "ananicy";
version = "unstable-2023-03-21";
src = fetchFromGitHub {
owner = "nefelim4ag";
repo = "ananicy";
rev = "1e2cc9a62ba3b6793e59da66aa0039f89e1ad49f";
sha256 = "sha256-nHp47eYI36edka+cBMzayPHEflAzpgLx0VehhsyYpwI=";
};
patches = [
# https://github.com/Nefelim4ag/Ananicy/pull/437
# fix makefile destinations
(fetchpatch {
url = "https://github.com/Nefelim4ag/Ananicy/commit/dbda0f50670de3f249991706ef1cc107c5197a2f.patch";
sha256 = "sha256-vMcJxekg2QUbm253CLAv3tmo5kedSlw+/PI/LamNWwc=";
# only used for debian packaging. lets exclude it so the patch applies even when that file is changed
excludes = [ "package.sh" ];
})
];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python3 ];
makeFlags = [
"PREFIX=$(out)"
"SYSCONFDIR=${placeholder "out"}/etc"
];
dontConfigure = true;
dontBuild = true;
postInstall = ''
wrapProgram $out/bin/ananicy \
--prefix PATH : ${
lib.makeBinPath [
schedtool
util-linux
]
}
substituteInPlace $out/lib/systemd/system/ananicy.service \
--replace "/sbin/sysctl" "${sysctl}/bin/sysctl" \
--replace "/usr/bin/ananicy" "$out/bin/ananicy"
'';
meta = with lib; {
homepage = "https://github.com/Nefelim4ag/Ananicy";
description = "Another auto nice daemon, with community rules support";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ artturin ];
mainProgram = "ananicy";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitLab,
SDL2,
xorg,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "anarch";
version = "1.0-unstable-2023-09-08";
src = fetchFromGitLab {
owner = "drummyfish";
repo = "anarch";
rev = "6f90562161200682459e772f1dacb747f23c5f95";
hash = "sha256-KmuJruzQRFunhwUGz3bHhXgtD2m4+5Vk0n7xhzVBMWs=";
};
buildInputs = [
SDL2
xorg.libXcursor
xorg.libXrandr
xorg.libXfixes
xorg.libXext
xorg.libXi
xorg.libXScrnSaver
];
# upstream is an error-prone make/build script
buildPhase = ''
runHook preBuild
$CC -O3 -o anarch main_sdl.c $(sdl2-config --cflags --libs)
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 anarch $out/bin/anarch
runHook postInstall
'';
meta = {
homepage = "https://drummyfish.gitlab.io/anarch/";
description = "Suckless FPS game";
maintainers = with lib.maintainers; [ ethancedwards8 ];
license = lib.licenses.cc0;
platforms = lib.platforms.unix;
mainProgram = "anarch";
};
})

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitLab,
xdg-utils,
}:
stdenv.mkDerivation rec {
pname = "anarchism";
version = "15.3-1";
src = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "debian";
repo = "anarchism";
rev = "debian/${version}";
sha256 = "04ylk0y5b3jml2awmyz7m1hnymni8y1n83m0k6ychdh0px8frhm5";
};
postPatch = ''
substituteInPlace debian/anarchism.desktop \
--replace "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open"
substituteInPlace debian/anarchism.desktop \
--replace "file:///usr" "file://$out"
'';
installPhase = ''
mkdir -p $out/share/doc/anarchism $out/share/applications $out/share/icons/hicolor/scalable/apps
cp -r {html,markdown} $out/share/doc/anarchism
cp debian/anarchism.svg $out/share/icons/hicolor/scalable/apps
cp debian/anarchism.desktop $out/share/applications
'';
meta = with lib; {
homepage = "https://www.anarchistfaq.org/";
changelog = "http://anarchism.pageabode.com/afaq/new.html";
description = "Exhaustive exploration of Anarchist theory and practice";
longDescription = ''
The Anarchist FAQ is an excellent source of information regarding Anarchist
(libertarian socialist) theory and practice. It covers all major topics,
from the basics of Anarchism to very specific discussions of politics,
social organization, and economics.
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ davidak ];
platforms = with platforms; all;
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "anchor";
version = "0.31.1";
src = fetchFromGitHub {
owner = "coral-xyz";
repo = "anchor";
tag = "v${version}";
hash = "sha256-pvD0v4y7DilqCrhT8iQnAj5kBxGQVqNvObJUBzFLqzA=";
fetchSubmodules = true;
};
cargoHash = "sha256-fjhLA+utQdgR75wg+/N4VwASW6+YBHglRPj14sPHmGA=";
checkFlags = [
# the following test cases try to access network, skip them
"--skip=tests::test_check_and_get_full_commit_when_full_commit"
"--skip=tests::test_check_and_get_full_commit_when_partial_commit"
"--skip=tests::test_get_anchor_version_from_commit"
];
meta = with lib; {
description = "Solana Sealevel Framework";
homepage = "https://github.com/coral-xyz/anchor";
changelog = "https://github.com/coral-xyz/anchor/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ Denommus ];
mainProgram = "anchor";
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation {
pname = "andagii";
version = "1.0.2";
src = fetchzip {
url = "http://www.i18nguy.com/unicode/andagii.zip";
curlOpts = "--user-agent 'Mozilla/5.0'";
hash = "sha256-U7wC55G8jIvMMyPcEiJQ700A7nkWdgWK1LM0F/wgDCg=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp -v ANDAGII_.TTF $out/share/fonts/truetype/andagii.ttf
runHook postInstall
'';
meta = {
homepage = "http://www.i18nguy.com/unicode/unicode-font.html";
description = "Unicode Plane 1 Osmanya script font";
maintainers = [ lib.maintainers.raskin ];
license = lib.licenses.unfreeRedistributable; # upstream uses the term copyleft only
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
fetchFromGitHub,
buildGoModule,
versionCheckHook,
writableTmpDirAsHomeHook,
}:
buildGoModule (finalAttrs: {
pname = "andcli";
version = "2.4.1";
subPackages = [ "cmd/andcli" ];
src = fetchFromGitHub {
owner = "tjblackheart";
repo = "andcli";
tag = "v${finalAttrs.version}";
hash = "sha256-T5XapWiQFZlSKBCqE9sv2pY4okXkeZEKuG6UOK/XyaI=";
};
vendorHash = "sha256-652JLCdxDDvhQIz3EbfoI7h+41Er3TiuJXi1cqbA4nI=";
ldflags = [
"-s"
"-w"
"-X github.com/tjblackheart/andcli/v2/internal/buildinfo.Commit=${finalAttrs.src.tag}"
"-X github.com/tjblackheart/andcli/v2/internal/buildinfo.AppVersion=${finalAttrs.src.tag}"
];
nativeInstallCheckInputs = [
writableTmpDirAsHomeHook
versionCheckHook
];
versionCheckProgramArg = "--version";
versionCheckKeepEnvironment = [ "HOME" ];
doInstallCheck = true;
meta = {
homepage = "https://github.com/tjblackheart/andcli";
description = "2FA TUI for your shell";
changelog = "https://github.com/tjblackheart/andcli/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ Cameo007 ];
mainProgram = "andcli";
};
})

View File

@@ -0,0 +1,32 @@
{
lib,
fetchFromGitHub,
ocamlPackages,
}:
ocamlPackages.buildDunePackage rec {
pname = "anders";
version = "1.1.1";
duneVersion = "3";
src = fetchFromGitHub {
owner = "groupoid";
repo = "anders";
tag = version;
sha256 = "sha256-JUiZoo2rNLfgs94TlJqUNzul/7ODisCjSFAzhgSp1z4=";
};
strictDeps = true;
nativeBuildInputs = [ ocamlPackages.menhir ];
buildInputs = [ ocamlPackages.zarith ];
meta = with lib; {
description = "Modal Homotopy Type System";
mainProgram = "anders";
homepage = "https://homotopy.dev/";
license = licenses.isc;
maintainers = [ maintainers.suhr ];
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
glib,
gsl,
libdivsufsort,
llvmPackages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "andi";
version = "0.14";
src = fetchFromGitHub {
owner = "evolbioinf";
repo = "andi";
tag = "v${finalAttrs.version}";
hash = "sha256-tjQ9exFyqu/xnbUGpF6k0kE5C1D93kISjRErwHfjW9E=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
gsl
libdivsufsort
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ];
configureFlags = [ (lib.enableFeature finalAttrs.finalPackage.doCheck "unit-tests") ];
nativeCheckInputs = [ glib ];
doCheck = true;
preCheck = ''
patchShebangs ./test
'';
meta = {
description = "Efficient Estimation of Evolutionary Distances";
homepage = "https://github.com/evolbioinf/andi";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ natsukium ];
mainProgram = "andi";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "andika";
version = "7.000";
src = fetchzip {
url = "https://software.sil.org/downloads/r/andika/Andika-${version}.zip";
hash = "sha256-46kbzFxNEpSuqyUwpScnxxgZi1dJlwK+AUkdULcinok=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttf -t $out/share/fonts/truetype
install -Dm644 OFL.txt OFL-FAQ.txt README.txt FONTLOG.txt -t $out/share/doc/${pname}-${version}
runHook postInstall
'';
meta = with lib; {
homepage = "https://software.sil.org/andika";
description = "Family designed especially for literacy use taking into account the needs of beginning readers";
longDescription = ''
Andika is a sans serif, Unicode-compliant font designed especially for literacy use, taking into account the needs of beginning readers. The focus is on clear, easy-to-perceive letterforms that will not be readily confused with one another.
A sans serif font is preferred by some literacy personnel for teaching people to read. Its forms are simpler and less cluttered than those of most serif fonts. For years, literacy workers have had to make do with fonts that were not really suitable for beginning readers and writers. In some cases, literacy specialists have had to tediously assemble letters from a variety of fonts in order to get all of the characters they need for their particular language project, resulting in confusing and unattractive publications. Andika addresses those issues.
'';
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.f--t ];
};
}

View File

@@ -0,0 +1,41 @@
{
stdenv,
lib,
fetchurl,
makeWrapper,
jre,
}:
stdenv.mkDerivation {
pname = "android-backup-extractor";
version = "0-unstable-2025-01-15";
src = fetchurl {
url = "https://github.com/nelenkov/android-backup-extractor/releases/download/latest/abe-62310d4.jar";
hash = "sha256-KY85I8OJCH7z6U6y9UbelFb3rvBVCid+AjJcucNGLdA=";
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
runHook preInstall
install -D $src $out/lib/android-backup-extractor/abe.jar
makeWrapper ${jre}/bin/java $out/bin/abe --add-flags "-cp $out/lib/android-backup-extractor/abe.jar org.nick.abe.Main"
runHook postInstall
'';
meta = with lib; {
description = "Utility to extract and repack Android backups created with adb backup";
mainProgram = "abe";
homepage = "https://github.com/nelenkov/android-backup-extractor";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
maintainers = with maintainers; [ prusnak ];
};
}

View File

@@ -0,0 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 574b354..1a62874 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -254,16 +254,6 @@ endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX_BUNDLE_LIBS)
- if (OPENSSL_FOUND)
- list(APPEND MACOSX_BUNDLE_LIBS /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib)
- endif()
- if (TAGLIB_FOUND)
- list(APPEND MACOSX_BUNDLE_LIBS /usr/local/opt/taglib/lib/libtag.2.dylib)
- endif()
- if (FUSE_FOUND)
- list(APPEND MACOSX_BUNDLE_LIBS /usr/local/lib/libosxfuse.2.dylib)
- endif()
-
set(MACOSX_BUNDLE_LIBS_INSTALL)
set(MACOSX_BUNDLE_ROOT_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_PROJECT_NAME}.app")
message(STATUS "bundle root dir: ${MACOSX_BUNDLE_ROOT_DIR}")

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
fuse3,
readline,
pkg-config,
qt6,
}:
stdenv.mkDerivation rec {
pname = "android-file-transfer";
version = "4.5";
src = fetchFromGitHub {
owner = "whoozle";
repo = "android-file-transfer-linux";
tag = "v${version}";
sha256 = "sha256-G+ErwZ/F8Cl8WLSzC+5LrEWWqNZL3xDMBvx/gjkgAXk=";
};
patches = [ ./darwin-dont-vendor-dependencies.patch ];
nativeBuildInputs = [
cmake
readline
pkg-config
qt6.wrapQtAppsHook
];
buildInputs = [
fuse3
qt6.qtbase
qt6.qttools
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
mv $out/*.app $out/Applications
'';
meta = with lib; {
description = "Reliable MTP client with minimalistic UI";
homepage = "https://whoozle.github.io/android-file-transfer-linux/";
license = licenses.lgpl21Plus;
maintainers = [ maintainers.xaverdh ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenvNoCC,
fetchzip,
makeWrapper,
openjdk,
}:
stdenvNoCC.mkDerivation {
pname = "android-studio-tools";
version = "13114758";
src = fetchzip {
# The only difference between the Linux and Mac versions is a single comment at the top of all the scripts
# Therefore, we will use the Linux version and just patch the comment
url = "https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip";
hash = "sha256-dt8nwjL8wyRfBZOedCPYXh7zyeMUeH0gOPpTcpxCegU=";
};
postPatch = ''
find . -type f -not -path "./bin/*" -exec chmod -x {} \;
''
+ lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
for f in cmdline-tools/bin/*; do
sed -i 's|start up script for Linux|start up script for Mac|' $f
done
'';
nativeBuildInputs = [ makeWrapper ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r . $out
for f in $out/bin/*; do
wrapProgram $f --set JAVA_HOME "${openjdk}"
done
runHook postInstall
'';
meta = {
description = "Android Studio CLI Tools";
homepage = "https://developer.android.com/studio";
downloadPage = "https://developer.android.com/studio";
changelog = "https://developer.android.com/studio/releases";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ pandapip1 ];
teams = [ lib.teams.android ];
platforms = lib.platforms.all;
sourceProvenance = with lib.sourceTypes; [ fromSource ]; # The 'binaries' are actually shell scripts
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index ba8027c2..fb21e317 100644
--- a/meson.build
+++ b/meson.build
@@ -171,7 +171,7 @@ libtranslationlayer_so = shared_library('translation_layer_main', [
extra_deps,
dependency('gtk4', version: '>=4.14'), dependency('gl'), dependency('egl'), dependency('wayland-client'), dependency('jni'),
dependency('libportal'), dependency('sqlite3'), dependency('libavcodec', version: '>=59'), dependency('libdrm'),
- dependency('gudev-1.0'), dependency('libswscale'), dependency('webkitgtk-6.0'),
+ dependency('gudev-1.0'), dependency('libswscale'), dependency('webkitgtk-6.0'), dependency('gio-unix-2.0'),
libart_dep, wayland_protos_dep
],
link_with: [ libandroid_so ],

View File

@@ -0,0 +1,12 @@
diff --git a/src/main-executable/main.c b/src/main-executable/main.c
index d7cfbfe8..c542c71a 100644
--- a/src/main-executable/main.c
+++ b/src/main-executable/main.c
@@ -311,6 +311,7 @@ static void open(GtkApplication *app, GFile **files, gint nfiles, const gchar *h
} else {
dex_install_dir = "DIDN'T_GET_SO_PATH_WITH_dladdr_SUS"; // in case we print this as part of some other error, it should be clear what the real cause is
}
+ dex_install_dir = "@out@/lib/java/dex";
char *app_data_dir_base = getenv("ANDROID_APP_DATA_DIR");
if (!app_data_dir_base) {

View File

@@ -0,0 +1,16 @@
diff --git a/src/main-executable/main.c b/src/main-executable/main.c
index 545da00f..2f87447d 100644
--- a/src/main-executable/main.c
+++ b/src/main-executable/main.c
@@ -390,7 +390,10 @@ static void open(GtkApplication *app, GFile **files, gint nfiles, const gchar *h
ret = stat(MICROG_APK_PATH_LOCAL, &dont_care);
errno_localdir = errno;
- if (!ret) {
+ char *env_microg = getenv("MICROG_APK_PATH");
+ if (env_microg && access(env_microg, F_OK) == 0) {
+ microg_apk = strdup(env_microg);
+ } else if (stat(MICROG_APK_PATH_LOCAL, &dont_care) == 0) {
microg_apk = strdup(MICROG_APK_PATH_LOCAL); // for running out of builddir; using strdup so we can always safely call free on this
} else {
char *microg_install_dir = malloc(strlen(dex_install_dir) + strlen(REL_MICROG_APK_INSTALL_PATH) + 1); // +1 for NULL

View File

@@ -0,0 +1,113 @@
{
stdenv,
fetchFromGitLab,
ffmpeg,
meson,
openjdk17,
lib,
glib,
pkg-config,
wayland-protocols,
wayland,
wayland-scanner,
gtk4,
openxr-loader,
libglvnd,
libportal-gtk4,
sqlite,
libdrm,
libgudev,
webkitgtk_6_0,
ninja,
art-standalone,
bionic-translation,
alsa-lib,
makeWrapper,
replaceVars,
nixosTests,
bintools,
}:
stdenv.mkDerivation {
pname = "android-translation-layer";
version = "0-unstable-2025-09-14";
src = fetchFromGitLab {
owner = "android_translation_layer";
repo = "android_translation_layer";
rev = "9de91586994af5078decda17db92ce50c5673951";
hash = "sha256-iRjP++WzLsV7oDGNdF3m9JJJS7zLrG5W46U3h39H5uk=";
};
patches = [
# Required gio-unix dependency is missing in meson.build
./add-gio-unix-dep.patch
# Patch custon Dex install dir
./configure-dex-install-dir.patch
# Patch atl to load microg apk from custom path
./configure-microg-path.patch
];
postPatch = ''
# As we need the $out reference, we can't use `replaceVars` here.
substituteInPlace src/main-executable/main.c \
--replace-fail '@out@' "$out"
'';
nativeBuildInputs = [
makeWrapper
meson
ninja
openjdk17
pkg-config
];
buildInputs = [
alsa-lib
art-standalone
bionic-translation
ffmpeg
gtk4
libdrm
libglvnd
libgudev
libportal-gtk4
openxr-loader
sqlite
wayland
wayland-protocols
wayland-scanner
webkitgtk_6_0
];
postInstall = ''
install -D $src/com.google.android.gms.apk $out/share/com.google.android.gms.apk
'';
postFixup = ''
wrapProgram $out/bin/android-translation-layer \
--prefix LD_LIBRARY_PATH : ${art-standalone}/lib/art \
--prefix PATH : ${
lib.makeBinPath [
art-standalone # dex2oat
bintools # addr2line
]
} \
--set MICROG_APK_PATH "$out/share/com.google.android.gms.apk"
'';
passthru.tests = {
inherit (nixosTests) android-translation-layer;
};
meta = {
description = "Translation layer that allows running Android apps on a Linux system";
homepage = "https://gitlab.com/android_translation_layer/android_translation_layer";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ onny ];
mainProgram = "android-translation-layer";
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
udevCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "android-udev-rules";
version = "20250525";
src = fetchFromGitHub {
owner = "M0Rf30";
repo = "android-udev-rules";
rev = finalAttrs.version;
hash = "sha256-4ODU9EoVYV+iSu6+M9ePed45QkOZgWkDUlFTlWJ8ttQ=";
};
installPhase = ''
runHook preInstall
install -D 51-android.rules $out/lib/udev/rules.d/51-android.rules
runHook postInstall
'';
nativeBuildInputs = [
udevCheckHook
];
doInstallCheck = true;
meta = {
homepage = "https://github.com/M0Rf30/android-udev-rules";
description = "Android udev rules list aimed to be the most comprehensive on the net";
longDescription = ''
Android udev rules list aimed to be the most comprehensive on the net.
To use on NixOS, simply add this package to services.udev.packages:
```nix
services.udev.packages = [ pkgs.android-udev-rules ];
```
'';
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = [ ];
teams = [ lib.teams.android ];
};
})

View File

@@ -0,0 +1,99 @@
{
lib,
stdenv,
fetchurl,
libvorbis,
libogg,
libtheora,
SDL,
libXft,
SDL_image,
zlib,
libX11,
libpng,
openal,
runtimeShell,
requireFile,
commercialVersion ? false,
}:
stdenv.mkDerivation rec {
pname = "andyetitmoves";
version = "1.2.2";
src =
if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then
let
postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64";
commercialName = "${pname}-${version}_${postfix}.tar.gz";
demoUrl = "http://www.andyetitmoves.net/demo/${pname}Demo-${version}_${postfix}.tar.gz";
in
if commercialVersion then
requireFile {
message = ''
We cannot download the commercial version automatically, as you require a license.
Once you bought a license, you need to add your downloaded version to the nix store.
You can do this by using "nix-prefetch-url file:///\$PWD/${commercialName}" in the
directory where yousaved it.
'';
name = commercialName;
sha256 =
if stdenv.hostPlatform.system == "i686-linux" then
"15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01"
else
"1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql";
}
else
fetchurl {
url = demoUrl;
sha256 =
if stdenv.hostPlatform.system == "i686-linux" then
"0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525"
else
"0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4";
}
else
throw "And Yet It Moves nix package only supports linux and intel cpu's.";
installPhase = ''
mkdir -p $out/{opt/andyetitmoves,bin}
cp -r * $out/opt/andyetitmoves/
fullPath=${lib.getLib stdenv.cc.cc}/lib64
for i in $nativeBuildInputs; do
fullPath=$fullPath''${fullPath:+:}$i/lib
done
binName=${if commercialVersion then "AndYetItMoves" else "AndYetItMovesDemo"}
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName
cat > $out/bin/$binName << EOF
#!${runtimeShell}
cd $out/opt/andyetitmoves
exec ./lib/$binName
EOF
chmod +x $out/bin/$binName
'';
buildInputs = [
libvorbis
libogg
libtheora
SDL
libXft
SDL_image
zlib
libX11
libpng
openal
];
meta = with lib; {
description = "Physics/Gravity Platform game";
longDescription = ''
And Yet It Moves is an award-winning physics-based platform game in which players rotate the game world at will to solve challenging puzzles. Tilting the world turns walls into floors, slides into platforms, and stacks of rocks into dangerous hazards.
'';
homepage = "http://www.andyetitmoves.net/";
license = licenses.unfree;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "anew";
version = "0.1.1";
src = fetchFromGitHub {
owner = "tomnomnom";
repo = "anew";
tag = "v${version}";
hash = "sha256-NQSs99/2GPOtXkO7k+ar16G4Ecu4CPGMd/CTwEhcyto=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Tool for adding new lines to files, skipping duplicates";
mainProgram = "anew";
homepage = "https://github.com/tomnomnom/anew";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "anewer";
version = "0.1.6";
src = fetchFromGitHub {
owner = "ysf";
repo = "anewer";
tag = version;
sha256 = "181mi674354bddnq894yyq587w7skjh35vn61i41vfi6lqz5dy3d";
};
cargoHash = "sha256-ojgm5LTOOhnGS7tUD1UUktviivp68u0c06gIJNhEO1E=";
meta = with lib; {
description = "Append lines from stdin to a file if they don't already exist in the file";
mainProgram = "anewer";
homepage = "https://github.com/ysf/anewer";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
ncurses5,
enableSdl2 ? false,
SDL2,
SDL2_image,
SDL2_mixer,
SDL2_ttf,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "angband";
version = "4.2.5";
src = fetchFromGitHub {
owner = "angband";
repo = "angband";
rev = finalAttrs.version;
hash = "sha256-XH2FUTJJaH5TqV2UD1CKKAXE4CRAb6zfg1UQ79a15k0=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
ncurses5
]
++ lib.optionals enableSdl2 [
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
];
configureFlags = lib.optional enableSdl2 "--enable-sdl2";
installFlags = [ "bindir=$(out)/bin" ];
meta = with lib; {
homepage = "https://angband.github.io/angband";
description = "Single-player roguelike dungeon exploration game";
mainProgram = "angband";
maintainers = [ maintainers.kenran ];
license = licenses.gpl2Only;
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchurl,
unzip,
cmake,
}:
stdenv.mkDerivation rec {
pname = "angelscript";
version = "2.38.0";
src = fetchurl {
url = "https://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
sha256 = "sha256-sztdvNoQMX72fWKDU9gyRphM5vysEC1Nwq7RIeulLm8=";
};
nativeBuildInputs = [
unzip
cmake
];
preConfigure = ''
export ROOT=$PWD
cd angelscript/projects/cmake
'';
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
postInstall = ''
mkdir -p "$out/share/docs/angelscript"
cp -r $ROOT/docs/* "$out/share/docs/angelscript"
'';
meta = with lib; {
description = "Light-weight scripting library";
license = licenses.zlib;
maintainers = with maintainers; [ raskin ];
platforms = platforms.all;
downloadPage = "https://www.angelcode.com/angelscript/downloads.html";
homepage = "https://www.angelcode.com/angelscript/";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
fetchFromGitHub,
rustPlatform,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "angle-grinder";
version = "0.19.4";
src = fetchFromGitHub {
owner = "rcoh";
repo = "angle-grinder";
tag = "v${version}";
sha256 = "sha256-1SZho04qJcNi84ZkDmxoVkLx9VJX04QINZQ6ZEoCq+c=";
};
cargoHash = "sha256-B7JFwFzE8ZvbTjCUZ6IEtjavPGkx3Nb9FMSPbNFqiuU=";
passthru = {
updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
};
meta = with lib; {
description = "Slice and dice logs on the command line";
homepage = "https://github.com/rcoh/angle-grinder";
license = licenses.mit;
maintainers = with maintainers; [ bbigras ];
mainProgram = "agrind";
};
}

View File

@@ -0,0 +1,16 @@
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 0c04c9036..1f32ec562 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1992,6 +1992,11 @@ config("tot_warnings") {
"-Wno-character-conversion",
]
}
+
+ cflags += [
+ # TODO(crbug.com/432275627): Fix and re-enable.
+ "-Wno-uninitialized-const-pointer"
+ ]
}
# default_warnings ------------------------------------------------------------

View File

@@ -0,0 +1,522 @@
{
"src/build": {
"args": {
"hash": "sha256-dF/oqsbgJ+rqu+4G5s5/h77tByKaejj0DD+Yj3HG9r0=",
"rev": "169fcf699b64d2d5e75a391beaec8a7ad6e41a7f",
"url": "https://chromium.googlesource.com/chromium/src/build.git"
},
"fetcher": "fetchFromGitiles"
},
"src/buildtools": {
"args": {
"hash": "sha256-Oc3PLsNSY5feY+qGZgXWv6GlW07tk3S64xwkErueY6Y=",
"rev": "5b7491dfe58d387aaf1391749afdfbaa19dcbb89",
"url": "https://chromium.googlesource.com/chromium/src/buildtools.git"
},
"fetcher": "fetchFromGitiles"
},
"src": {
"args": {
"hash": "sha256-2KV5vzBbn27PfxwtVCLgoEdxGrd3GiDiiqffWGv16MM=",
"rev": "7ab02e1d49a649adaba62b8a7fdfabf8144b313f",
"url": "https://chromium.googlesource.com/angle/angle"
},
"fetcher": "fetchFromGitiles"
},
"src/testing": {
"args": {
"hash": "sha256-q2eSRf9vO+MoQorl4ybMKcFLiE6qCklmO+63jdr1TV0=",
"rev": "0d5210a4b1978e7e2c6b8623c719dff0a0994a8f",
"url": "https://chromium.googlesource.com/chromium/src/testing"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/EGL-Registry/src": {
"args": {
"hash": "sha256-Z6DwLfgQ1wsJXz0KKJyVieOatnDmx3cs0qJ6IEgSq1A=",
"rev": "7dea2ed79187cd13f76183c4b9100159b9e3e071",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/EGL-Registry"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/OpenCL-CTS/src": {
"args": {
"hash": "sha256-/YmLOW0kcLWaJcUnX+x//R8pgy05YihZykkhKnbp25o=",
"rev": "e0a31a03fc8f816d59fd8b3051ac6a61d3fa50c6",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenCL-CTS"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/OpenCL-Docs/src": {
"args": {
"hash": "sha256-RnukrtXh8mAbskzNx99OjDzcFfQHl+Lq2OmPEZlu1Vo=",
"rev": "774114e8761920b976d538d47fad8178d05984ec",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenCL-Docs"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/OpenCL-ICD-Loader/src": {
"args": {
"hash": "sha256-JJgTD8fD3TNCIq16bfg+nTaVs17vKFNShCn6F4ermCA=",
"rev": "9b5e3849b49a1448996c8b96ba086cd774d987db",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenCL-ICD-Loader"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/OpenGL-Registry/src": {
"args": {
"hash": "sha256-RdGIm0thB10DvyFYnYgTkUU8LgTLPfIgyfEgua4FJYE=",
"rev": "200cea4030cb49d3e40677379e6368a5f0e8c27b",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenGL-Registry"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/Python-Markdown": {
"args": {
"hash": "sha256-qvtPcNJ0Pz1oCqZqrdm/TCQ+QBwDZjuWWvEGftXAPW8=",
"rev": "0f4473546172a64636f5d841410c564c0edad625",
"url": "https://chromium.googlesource.com/chromium/src/third_party/Python-Markdown"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/SwiftShader": {
"args": {
"hash": "sha256-kfY/I2V3t52wWrT8CU9TK3EhZP/Cw5sd/wF9dMGpHBI=",
"rev": "0ce9bc68d3fc995f76dcab4771c26471100ce759",
"url": "https://swiftshader.googlesource.com/SwiftShader"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/VK-GL-CTS/src": {
"args": {
"hash": "sha256-fl3yXkdi1KqrrmHB9k+l/eaINuFHgruUL6MB/9QXvhE=",
"rev": "4c617fa74b67a177c7bde5f48c73f5a5509121ed",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/VK-GL-CTS"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/abseil-cpp": {
"args": {
"hash": "sha256-0ztP0QhEnChkGOXbSP3T4epbzzf/T6POfohe58sFTwE=",
"rev": "e3d58ba1a2a04f85225c3c04fa4603bb64399b2c",
"url": "https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/astc-encoder/src": {
"args": {
"hash": "sha256-rCyi5Nla2IXsLD+rLMTN1h3B9umlNN0epZmPi/IFHPQ=",
"rev": "2319d9c4d4af53a7fc7c52985e264ce6e8a02a9b",
"url": "https://chromium.googlesource.com/external/github.com/ARM-software/astc-encoder"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/catapult": {
"args": {
"hash": "sha256-GlcGCmcQrA/YawQDFs8QB4GKZIPyBNiSgwm45LFg+go=",
"rev": "a03b70978cc52840b549947f0fb165f03764c700",
"url": "https://chromium.googlesource.com/catapult.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/cherry": {
"args": {
"hash": "sha256-x41m6HooD57wTDne58/sRK5QJvvOYfRWgdrwuw9tQyM=",
"rev": "4f8fb08d33ca5ff05a1c638f04c85bbb8d8b52cc",
"url": "https://android.googlesource.com/platform/external/cherry"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/clang-format/script": {
"args": {
"hash": "sha256-d9uweklBffiuCWEb03ti1eFLnMac2qRtvggzXY1n/RU=",
"rev": "37f6e68a107df43b7d7e044fd36a13cbae3413f2",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/clspv/src": {
"args": {
"hash": "sha256-OYD/74HVwg5o910luPVB0Benj1nNZ1eGXijoqHy/OH8=",
"rev": "60f822e8123ca414dddc0e0f944440c99cb3c04d",
"url": "https://chromium.googlesource.com/external/github.com/google/clspv"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/dawn": {
"args": {
"hash": "sha256-Xc86K5H4kNe9vtqQAW6y/iBGgdrK9qxT1Z8/gGkSEvQ=",
"rev": "7a8946456d4957dedd0137278f2198e02066b319",
"url": "https://dawn.googlesource.com/dawn.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/dawn/third_party/dxc": {
"args": {
"hash": "sha256-sUSQTOi0EuIHX9h27RXb5HnbcdfkG/U1K6EbBdjSto8=",
"rev": "0a1143572d107c8b6980df092b84a79190ec1fbd",
"url": "https://chromium.googlesource.com/external/github.com/microsoft/DirectXShaderCompiler"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/dawn/third_party/dxheaders": {
"args": {
"hash": "sha256-0Miw1Cy/jmOo7bLFBOHuTRDV04cSeyvUEyPkpVsX9DA=",
"rev": "980971e835876dc0cde415e8f9bc646e64667bf7",
"url": "https://chromium.googlesource.com/external/github.com/microsoft/DirectX-Headers"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/dawn/third_party/glfw": {
"args": {
"hash": "sha256-E1zXIDiw87badrLOZTvV+Wh9NZHu51nb70ZK9vlAlqE=",
"rev": "b35641f4a3c62aa86a0b3c983d163bc0fe36026d",
"url": "https://chromium.googlesource.com/external/github.com/glfw/glfw"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/dawn/third_party/khronos/EGL-Registry": {
"args": {
"hash": "sha256-Z6DwLfgQ1wsJXz0KKJyVieOatnDmx3cs0qJ6IEgSq1A=",
"rev": "7dea2ed79187cd13f76183c4b9100159b9e3e071",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/EGL-Registry"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/dawn/third_party/khronos/OpenGL-Registry": {
"args": {
"hash": "sha256-K3PcRIiD3AmnbiSm5TwaLs4Gu9hxaN8Y91WMKK8pOXE=",
"rev": "5bae8738b23d06968e7c3a41308568120943ae77",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenGL-Registry"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/depot_tools": {
"args": {
"hash": "sha256-GcBMHMvjSpKPoE8RK5xatfWT5BWPkFFUEkZpSeAcqWA=",
"rev": "8f878438075a8d5d76f57bd10ab866d58d706319",
"url": "https://chromium.googlesource.com/chromium/tools/depot_tools.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/glmark2/src": {
"args": {
"hash": "sha256-VebUALLFKwEa4+oE+jF8mBSzhJd6aflphPmcK1Em8bw=",
"rev": "6edcf02205fd1e8979dc3f3964257a81959b80c8",
"url": "https://chromium.googlesource.com/external/github.com/glmark2/glmark2"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/glslang/src": {
"args": {
"hash": "sha256-kfboAzNtplxcedYVt2F10Iqfp404amk/JkFt76gtuk0=",
"rev": "21b4e37133868b3a50ef15fc027ecd6d3a52c875",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/googletest": {
"args": {
"hash": "sha256-88lAwz2c3HgFdO1tmPrp/StXfSSAZnvUAUgaTcwdFQA=",
"rev": "17bbed2084d3127bd7bcd27283f18d7a5861bea8",
"url": "https://chromium.googlesource.com/chromium/src/third_party/googletest"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/googletest/src": {
"args": {
"hash": "sha256-VuOfUPwl3QHtxjGfWq2tjObutncRoOjEJoY1ET+4pNI=",
"rev": "2d924d7a971e9667d76ad09727fb2402b4f8a1e3",
"url": "https://chromium.googlesource.com/external/github.com/google/googletest.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/jinja2": {
"args": {
"hash": "sha256-RhNDCE9d9ik/YNF0CSrSoBvpeGi04y3ChIY2c66lJpo=",
"rev": "c3027d884967773057bf74b957e3fea87e5df4d7",
"url": "https://chromium.googlesource.com/chromium/src/third_party/jinja2"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/jsoncpp": {
"args": {
"hash": "sha256-QdWSlzvgtOkr2dRRhkDz64InkDsVOXx43q9ABzrdFMo=",
"rev": "f62d44704b4da6014aa231cfc116e7fd29617d2a",
"url": "https://chromium.googlesource.com/chromium/src/third_party/jsoncpp"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/jsoncpp/source": {
"args": {
"hash": "sha256-bSLNcoYBz3QCt5VuTR056V9mU2PmBuYBa0W6hFg2m8Q=",
"rev": "42e892d96e47b1f6e29844cc705e148ec4856448",
"url": "https://chromium.googlesource.com/external/github.com/open-source-parsers/jsoncpp.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libc++/src": {
"args": {
"hash": "sha256-WbEMS4wowBw1j7UT/5G5DSmgy5ldmdjxMszYtobr9UI=",
"rev": "2c359c239b138a20a03f798e47889448ef131c22",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libc++abi/src": {
"args": {
"hash": "sha256-WIJAAHO+n6C5N7nyw8m8xGXr/OXvRGfsScBBdUyjxyg=",
"rev": "e44c3c4560f1742744ef3f9fb4217a5f26ebca1b",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libdrm/src": {
"args": {
"hash": "sha256-woSYEDUfcEBpYOYnli13wLMt754A7KnUbmTEcFQdFGw=",
"rev": "ad78bb591d02162d3b90890aa4d0a238b2a37cde",
"url": "https://chromium.googlesource.com/chromiumos/third_party/libdrm.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libjpeg_turbo": {
"args": {
"hash": "sha256-Ig+tmprZDvlf/M72/DTar2pbxat9ZElgSqdXdoM0lPs=",
"rev": "e14cbfaa85529d47f9f55b0f104a579c1061f9ad",
"url": "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libpng/src": {
"args": {
"hash": "sha256-ATde609XPHqSrT3www6M+pA1qd69hVhhW6wSMCIrJnM=",
"rev": "8cc222cd3e79fa5190f3aa039a03a4cbea6cfbe7",
"url": "https://android.googlesource.com/platform/external/libpng"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libunwind/src": {
"args": {
"hash": "sha256-hpOxKXZkZEWNptp31B1DZ8V9E7LsRbbYdPdUD7EYA+8=",
"rev": "5bbf35ae6801f579c523893176789774c0726e22",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/llvm-libc/src": {
"args": {
"hash": "sha256-tZDU/6mtjT8ZVIzahA4q9fqs5a2IYAGw/m9jO99tDcI=",
"rev": "3dc83eebbdc6adf43831985d410fb451d385a5b1",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libc.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/llvm/src": {
"args": {
"hash": "sha256-Oc8TvPj4hRrA7Dj8s7qx2bscLeKxZ8wpWtFfB9C6XF4=",
"rev": "1fd8d3fea53e6e4573cdce55bd38ef0a7813a442",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/lunarg-vulkantools/src": {
"args": {
"hash": "sha256-eYqBAet7SnTjouzEkJNr/eaMg+PxRAz9arZpAyeItM0=",
"rev": "da60ac4327af194dfa773a07db6cd5d5aaa6848d",
"url": "https://chromium.googlesource.com/external/github.com/LunarG/VulkanTools"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/markupsafe": {
"args": {
"hash": "sha256-mYsC/xZHpAbP/US2VRAfCYm0JeJ03is38S9s2KuA9PI=",
"rev": "4256084ae14175d38a3ff7d739dca83ae49ccec6",
"url": "https://chromium.googlesource.com/chromium/src/third_party/markupsafe"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/nasm": {
"args": {
"hash": "sha256-TxzAcp+CoKnnM0lCGjm+L3h6M30vYHjM07vW6zUe/vY=",
"rev": "e2c93c34982b286b27ce8b56dd7159e0b90869a2",
"url": "https://chromium.googlesource.com/chromium/deps/nasm.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/protobuf": {
"args": {
"hash": "sha256-JZU7ZqE8eE2M1urS4H6HM/jwEmjqp0XLEqPmbzE7dO4=",
"rev": "e0f7527112a9310b608afa49affe72e810697dce",
"url": "https://chromium.googlesource.com/chromium/src/third_party/protobuf"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/rapidjson/src": {
"args": {
"hash": "sha256-btUl1a/B0sXwf/+hyvCvVJjWqIkXfVYCpHm3TeBuOxk=",
"rev": "781a4e667d84aeedbeb8184b7b62425ea66ec59f",
"url": "https://chromium.googlesource.com/external/github.com/Tencent/rapidjson"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/rust": {
"args": {
"hash": "sha256-VXXPaj8XiSKbGa7eU5daq1AvwfjN7hhbpnHx/WL8OZk=",
"rev": "274de19b1d9b411b98b81672d1e300c86aaa2601",
"url": "https://chromium.googlesource.com/chromium/src/third_party/rust"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/spirv-cross/src": {
"args": {
"hash": "sha256-H43M9DXfEuyKuvo6rjb5k0KEbYOSFodbPJh8ZKY4PQg=",
"rev": "b8fcf307f1f347089e3c46eb4451d27f32ebc8d3",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/spirv-headers/src": {
"args": {
"hash": "sha256-LRjMy9xtOErbJbMh+g2IKXfmo/hWpegZM72F8E122oY=",
"rev": "2a611a970fdbc41ac2e3e328802aed9985352dca",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/spirv-tools/src": {
"args": {
"hash": "sha256-EPD+1RX4lCulEua4WfLTIqlDGCnxDRnRcH2a+pSI6mk=",
"rev": "108b19e5c6979f496deffad4acbe354237afa7d3",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/vulkan-deps": {
"args": {
"hash": "sha256-hXZs4L+XaHog/CyjX5WYP+2dl9WL3e/A8ql4xWEtwtI=",
"rev": "317a1e4780ef130e7b92fc287cf390ac2aff0c22",
"url": "https://chromium.googlesource.com/vulkan-deps"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/vulkan-headers/src": {
"args": {
"hash": "sha256-OorBl9vIN4DqVgT8ae+05yCLon7m0ixQczEzDlpwFRI=",
"rev": "10739e8e00a7b6f74d22dd0a547f1406ff1f5eb9",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/vulkan-loader/src": {
"args": {
"hash": "sha256-j9LAqdwI3+D6CY6a6CcFK85Cd3xxdjnhLSycuqZDGN0=",
"rev": "c8a2c8c9164a58ce71c1c77104e28e8de724539e",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Loader"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/vulkan-tools/src": {
"args": {
"hash": "sha256-EqLG8kMQx6nHX9iZMrsu0fn1z4nY6TEQ/feTINNbUzQ=",
"rev": "e3fc64396755191b3c51e5c57d0454872e7fa487",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/vulkan-utility-libraries/src": {
"args": {
"hash": "sha256-pQJln43t4U1VXJ2mpdRoUhOKyBTH0QePIMOy5f/0GXU=",
"rev": "0f0babb553a60da5971d9f4d40cf720ce01602f1",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Utility-Libraries"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/vulkan-validation-layers/src": {
"args": {
"hash": "sha256-yGciJW5vKvxdybz5jDo7LSw9K0d+oKr7/Yg/fBRTd4A=",
"rev": "89c6a9b6500e2e0bda127113bbfe1d70f1ab2d20",
"url": "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/vulkan_memory_allocator": {
"args": {
"hash": "sha256-YzxHZagz/M8Y54UnI4h1wu5jSTuaOgv0ifC9d3fJZlQ=",
"rev": "56300b29fbfcc693ee6609ddad3fdd5b7a449a21",
"url": "https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/zlib": {
"args": {
"hash": "sha256-MEUIIrlH4gBebO58sPhPLbRX+BeXo1SelJqhZAQk+wQ=",
"rev": "4028ebf8710ee39d2286cb0f847f9b95c59f84d8",
"url": "https://chromium.googlesource.com/chromium/src/third_party/zlib"
},
"fetcher": "fetchFromGitiles"
},
"src/tools/clang": {
"args": {
"hash": "sha256-3wLCPt0tqVVcojJWy7c1Z6a+b026kW6fha4Jg3ulScc=",
"rev": "ae0ff7090810342e6c7c378521bd78e79ed63bad",
"url": "https://chromium.googlesource.com/chromium/src/tools/clang.git"
},
"fetcher": "fetchFromGitiles"
},
"src/tools/mb": {
"args": {
"hash": "sha256-/hBZV38mn6/lj28AsJ0/SzcgaTJGH5IxoNXtJ8XhQVE=",
"rev": "1c0b50128bb1eee3d40731733ecae62f0e3ee40a",
"url": "https://chromium.googlesource.com/chromium/src/tools/mb"
},
"fetcher": "fetchFromGitiles"
},
"src/tools/md_browser": {
"args": {
"hash": "sha256-QJC7tI2CHE1Y9F42dgblPirUhS69s2P6qULrfDm2f7M=",
"rev": "6cc8e58a83412dc31de6fb7614fadb0b51748d4b",
"url": "https://chromium.googlesource.com/chromium/src/tools/md_browser"
},
"fetcher": "fetchFromGitiles"
},
"src/tools/memory": {
"args": {
"hash": "sha256-i5VVlfkKvymItH5S0d4eER+I6A4omMk3XrDNoGwnzmo=",
"rev": "cc38b4b04fbf942926366f420c43afb9e9ab364b",
"url": "https://chromium.googlesource.com/chromium/src/tools/memory"
},
"fetcher": "fetchFromGitiles"
},
"src/tools/perf": {
"args": {
"hash": "sha256-4qQcqlY1QcNk+wSL7on9Lc8101txQv3Usanprw/oVv4=",
"rev": "bd0baf9e31a384c4ff99b8911be4c07772ad513c",
"url": "https://chromium.googlesource.com/chromium/src/tools/perf"
},
"fetcher": "fetchFromGitiles"
},
"src/tools/protoc_wrapper": {
"args": {
"hash": "sha256-f8lpjbB7VnQQcDBSzxFbOroYjxprX+fU6fpl2Z3B3l8=",
"rev": "502dcad5230ec1da544e7720b15d91782f040d9f",
"url": "https://chromium.googlesource.com/chromium/src/tools/protoc_wrapper"
},
"fetcher": "fetchFromGitiles"
},
"src/tools/rust": {
"args": {
"hash": "sha256-ejYbEIlLpgdRedFVmZ9K8x3B//23BATw6w/n68mGBaI=",
"rev": "6c0ba3465b64d460de7426b707dcc73939a2226f",
"url": "https://chromium.googlesource.com/chromium/src/tools/rust.git"
},
"fetcher": "fetchFromGitiles"
},
"src/tools/valgrind": {
"args": {
"hash": "sha256-EBcH7f6lRPBYKX9NeaLShWPL1eeJhBDxJkR61OrFydU=",
"rev": "5ba62550b2f3d4d97974ebcdb4f8462e4ba14af2",
"url": "https://chromium.googlesource.com/chromium/src/tools/valgrind"
},
"fetcher": "fetchFromGitiles"
}
}

View File

@@ -0,0 +1,191 @@
{
stdenv,
gn,
ninja,
llvmPackages_21,
gclient2nix,
pkg-config,
glib,
python3,
symlinkJoin,
lib,
xorg,
wayland,
pciutils,
libGL,
apple-sdk_15,
xcbuild,
}:
let
llvmPackages = llvmPackages_21;
llvmMajorVersion = lib.versions.major llvmPackages.llvm.version;
arch = stdenv.hostPlatform.parsed.cpu.name;
triplet = lib.getAttr arch {
"x86_64" = "x86_64-unknown-linux-gnu";
"aarch64" = "aarch64-unknown-linux-gnu";
};
clang = symlinkJoin {
name = "angle-clang-llvm-join";
paths = [
llvmPackages.llvm
llvmPackages.clang
];
postBuild =
if stdenv.isDarwin then
''
mkdir -p $out/lib/clang/${llvmMajorVersion}/lib/darwin
ln -s $out/resource-root/lib/darwin/libclang_rt.osx.a \
$out/lib/clang/${llvmMajorVersion}/lib/darwin/libclang_rt.osx.a
ln -s $out/resource-root/lib/darwin/libclang_rt.osx.a \
$out/lib/clang/${llvmMajorVersion}/lib/darwin/libclang_rt.osx-${arch}.a
''
else
''
mkdir -p $out/lib/clang/${llvmMajorVersion}/lib/
ln -s $out/resource-root/lib/linux \
$out/lib/clang/${llvmMajorVersion}/lib/${triplet}
'';
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "angle";
version = "7258";
gclientDeps = gclient2nix.importGclientDeps ./info.json;
sourceRoot = "src";
strictDeps = true;
nativeBuildInputs = [
gn
ninja
gclient2nix.gclientUnpackHook
pkg-config
python3
llvmPackages.bintools
]
++ lib.optionals stdenv.isDarwin [
xcbuild
];
buildInputs =
lib.optionals stdenv.isLinux [
glib
xorg.libxcb.dev
xorg.libX11.dev
xorg.libXext.dev
xorg.libXi
wayland.dev
pciutils
libGL
]
++ lib.optionals stdenv.isDarwin [
apple-sdk_15
];
gnFlags = [
"is_debug=false"
"use_sysroot=false"
"clang_base_path=\"${clang}\""
"angle_build_tests=false"
"concurrent_links=1"
"use_custom_libcxx=true"
"angle_enable_swiftshader=false"
"angle_enable_wgpu=false"
# On darwin during linking:
# clang++: error: argument unused during compilation: '-stdlib=libc++'
"treat_warnings_as_errors=false"
];
patches = [
# https://issues.chromium.org/issues/432275627
# https://chromium-review.googlesource.com/c/chromium/src/+/6761936/2/build/config/compiler/BUILD.gn
./fix-uninitialized-const-pointer-error-001.patch
];
postPatch = ''
substituteInPlace build/config/clang/BUILD.gn \
--replace-fail \
"_dir = \"${triplet}\"" \
"_dir = \"${triplet}\"
_suffix = \"-${arch}\""
# Don't precompile Metal shaders, because the compiler is non-free.
substituteInPlace src/libANGLE/renderer/metal/metal_backend.gni \
--replace-fail \
"metal_internal_shader_compilation_supported =" \
"metal_internal_shader_compilation_supported = false &&"
cat > build/config/gclient_args.gni <<EOF
# Generated from 'DEPS'
checkout_angle_internal = false
checkout_angle_mesa = false
checkout_angle_restricted_traces = false
generate_location_tags = false
EOF
# For sandboxed build on darwin.
patchShebangs build/toolchain/apple
'';
installPhase = ''
runHook preInstall
install -v -m755 -D \
*${stdenv.hostPlatform.extensions.sharedLibrary}* \
-t "$out/lib"
install -v -m755 -D \
angle_shader_translator \
gaussian_distribution_gentables \
-t "$out/bin"
cp -rv ../../include "$out"
mkdir -p $out/lib/pkgconfig
cat > $out/lib/pkgconfig/angle.pc <<EOF
prefix=${placeholder "out"}
exec_prefix=''${prefix}
libdir=''${prefix}/lib
includedir=''${prefix}/include
Name: angle
Description: ${finalAttrs.meta.description}
URL: ${finalAttrs.meta.homepage}
Version: ${lib.versions.major finalAttrs.version}
Libs: -L''${libdir} -l${
lib.concatStringsSep " -l" [
"EGL"
"EGL_vulkan_secondaries"
"GLESv1_CM"
"GLESv2"
"GLESv2_vulkan_secondaries"
"GLESv2_with_capture"
"VkICD_mock_icd"
"feature_support"
]
}
Cflags: -I''${includedir}
EOF
runHook postInstall
'';
meta = {
description = "Conformant OpenGL ES implementation for Windows, Mac, Linux, iOS and Android";
longDescription = ''
The goal of ANGLE is to allow users of multiple operating systems
to seamlessly run WebGL and other OpenGL ES content by translating
OpenGL ES API calls to one of the hardware-supported APIs available
for that platform.
'';
homepage = "https://angleproject.org";
maintainers = with lib.maintainers; [
jess
jk
];
license = lib.licenses.bsd3;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
nixosTests,
testers,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "angrr";
version = "0.1.1";
src = fetchFromGitHub {
owner = "linyinfeng";
repo = "angrr";
tag = "v${finalAttrs.version}";
hash = "sha256-SL4UBDoD0pvpCKokQvKLAcS9cQJaFiA+IjswFARswdM=";
};
cargoHash = "sha256-lo9JpsHkvyrEqFnIiGlU2o4rREeQeqWpe9WMwisvw+4=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd angrr \
--bash <($out/bin/angrr completion bash) \
--fish <($out/bin/angrr completion fish) \
--zsh <($out/bin/angrr completion zsh)
'';
passthru = {
tests = {
module = nixosTests.angrr;
version = testers.testVersion {
package = finalAttrs.finalPackage;
};
};
updateScript = nix-update-script { };
};
meta = {
description = "Tool for auto Nix GC roots retention";
homepage = "https://github.com/linyinfeng/angrr";
license = [ lib.licenses.mit ];
maintainers = with lib.maintainers; [ yinfeng ];
platforms = with lib.platforms; linux ++ darwin;
mainProgram = "angrr";
};
})

View File

@@ -0,0 +1,58 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
libxkbcommon,
sqlite,
zlib,
wayland,
}:
let
libwifi = fetchFromGitHub {
owner = "Ragnt";
repo = "libwifi";
rev = "71268e1898ad88b8b5d709e186836db417b33e81";
hash = "sha256-2X/TZyLX9Tb54c6Sdla4bsWdq05NU72MVSuPvNfxySk=";
};
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "angryoxide";
version = "0.8.32";
src = fetchFromGitHub {
owner = "Ragnt";
repo = "AngryOxide";
tag = "v${finalAttrs.version}";
hash = "sha256-Sla5lvyqZho9JE4QVS9r0fx5+DVlU90c8OSfO4/f0B4=";
};
postPatch = ''
rm -r libs/libwifi
ln -s ${libwifi} libs/libwifi
'';
cargoHash = "sha256-mry4l0a7DZOWkrChU40OVRCBjKwI39cyZtvEBA5tro0=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libxkbcommon
sqlite
wayland
zlib
];
meta = {
description = "802.11 Attack Tool";
changelog = "https://github.com/Ragnt/AngryOxide/releases/tag/v${finalAttrs.version}";
homepage = "https://github.com/Ragnt/AngryOxide/";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fvckgrimm ];
mainProgram = "angryoxide";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
htslib,
zlib,
bzip2,
xz,
curl,
openssl,
}:
stdenv.mkDerivation rec {
pname = "angsd";
version = "0.940";
src = fetchFromGitHub {
owner = "ANGSD";
repo = "angsd";
sha256 = "sha256-Ppxgy54pAnqJUzNX5c12NHjKTQyEEcPSpCEEVOyZ/LA=";
tag = version;
};
patches = [
# Pull pending inclusion upstream patch for parallel buil fixes:
# https://github.com/ANGSD/angsd/pull/590
(fetchpatch {
name = "parallel-make.patch";
url = "https://github.com/ANGSD/angsd/commit/89fd1d898078016df390e07e25b8a3eeadcedf43.patch";
hash = "sha256-KQgUfr3v8xc+opAm4qcSV2eaupztv4gzJJHyzJBCxqA=";
})
];
buildInputs = [
htslib
zlib
bzip2
xz
curl
openssl
];
enableParallelBuilding = true;
makeFlags = [
"HTSSRC=systemwide"
"prefix=$(out)"
];
meta = with lib; {
description = "Program for analysing NGS data";
homepage = "http://www.popgen.dk/angsd";
maintainers = [ maintainers.bzizou ];
license = licenses.gpl2;
};
}

View File

@@ -0,0 +1,90 @@
{
lib,
stdenvNoCC,
fetchurl,
nodejs,
makeBinaryWrapper,
runCommand,
angular-language-server,
writeShellApplication,
curl,
common-updater-scripts,
jq,
unzip,
typescript,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "angular-language-server";
version = "20.2.2";
src = fetchurl {
name = "angular-language-server-${finalAttrs.version}.zip";
url = "https://github.com/angular/vscode-ng-language-service/releases/download/v${finalAttrs.version}/ng-template.vsix";
hash = "sha256-2I5Pmd05zNGjM15tFo2yw6AGUKp3zxufVcoe4oSAO5U=";
};
nativeBuildInputs = [
unzip
makeBinaryWrapper
];
buildInputs = [ nodejs ];
installPhase = ''
runHook preInstall
install -Dm555 server/bin/ngserver $out/lib/bin/ngserver
install -Dm444 server/index.js $out/lib/index.js
mkdir -p $out/lib/node_modules
cp -r node_modules/* $out/lib/node_modules
# do not use vendored typescript
rm -rf $out/lib/node_modules/typescript
runHook postInstall
'';
postFixup = ''
patchShebangs $out/lib/bin/ngserver $out/lib/index.js $out/lib/node_modules
makeWrapper $out/lib/bin/ngserver $out/bin/ngserver \
--prefix PATH : ${lib.makeBinPath [ nodejs ]} \
--add-flags "--tsProbeLocations ${typescript}/lib/node_modules/typescript --ngProbeLocations $out/lib/node_modules"
'';
passthru = {
tests = {
start-ok = runCommand "${finalAttrs.pname}-test" { } ''
${lib.getExe angular-language-server} --stdio --help &> $out
cat $out | grep "Angular Language Service that implements the Language Server Protocol (LSP)"
'';
};
updateScript = lib.getExe (writeShellApplication {
name = "update-angular-language-server";
runtimeInputs = [
curl
common-updater-scripts
jq
];
text = ''
if [ -z "''${GITHUB_TOKEN:-}" ]; then
echo "no GITHUB_TOKEN provided - you could meet API request limiting" >&2
fi
LATEST_VERSION=$(curl -H "Accept: application/vnd.github+json" \
''${GITHUB_TOKEN:+-H "Authorization: bearer $GITHUB_TOKEN"} \
-Lsf https://api.github.com/repos/angular/vscode-ng-language-service/releases/latest | \
jq -r .tag_name | cut -c 2-)
update-source-version angular-language-server "$LATEST_VERSION"
'';
});
};
meta = {
description = "LSP for angular completions, AOT diagnostic, quick info and go to definitions";
homepage = "https://github.com/angular/vscode-ng-language-service";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
changelog = "https://github.com/angular/vscode-ng-language-service/blob/${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
mainProgram = "ngserver";
maintainers = with lib.maintainers; [ tricktron ];
};
})

View File

@@ -0,0 +1,74 @@
{
fetchFromGitHub,
makeWrapper,
stdenvNoCC,
lib,
gnugrep,
gnused,
curl,
catt,
syncplay,
ffmpeg,
fzf,
aria2,
mpv,
vlc,
iina,
withMpv ? true,
withVlc ? false,
withIina ? false,
chromecastSupport ? false,
syncSupport ? false,
}:
let
players = lib.optional withMpv mpv ++ lib.optional withVlc vlc ++ lib.optional withIina iina;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ani-cli";
version = "4.10";
src = fetchFromGitHub {
owner = "pystardust";
repo = "ani-cli";
tag = "v${finalAttrs.version}";
hash = "sha256-R/YQ02ctTcAEzrVyWlaCHi1YW82iPrMBbbMNP21r0p8=";
};
nativeBuildInputs = [ makeWrapper ];
runtimeInputs = [
gnugrep
gnused
curl
fzf
ffmpeg
aria2
]
++ lib.optional chromecastSupport catt
++ lib.optional syncSupport syncplay;
installPhase = ''
runHook preInstall
install -Dm755 ani-cli $out/bin/ani-cli
wrapProgram $out/bin/ani-cli \
--prefix PATH : ${lib.makeBinPath finalAttrs.runtimeInputs} \
${lib.optionalString (builtins.length players > 0) "--suffix PATH : ${lib.makeBinPath players}"}
runHook postInstall
'';
meta = {
homepage = "https://github.com/pystardust/ani-cli";
description = "Cli tool to browse and play anime";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
skykanin
diniamo
];
platforms = lib.platforms.unix;
mainProgram = "ani-cli";
};
})

View File

@@ -0,0 +1,55 @@
{
stdenvNoCC,
fetchFromGitHub,
makeWrapper,
gnugrep,
gnused,
curl,
fzf,
lib,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ani-skip";
version = "1.0.1";
src = fetchFromGitHub {
owner = "synacktraa";
repo = "ani-skip";
tag = finalAttrs.version;
hash = "sha256-VEEG3d6rwTAS7/+gBKHFKIg9zFfBu5eBOu6Z23621gM=";
};
nativeBuildInputs = [ makeWrapper ];
runtimeInputs = [
gnugrep
gnused
curl
fzf
];
installPhase = ''
runHook preInstall
install -D skip.lua $out/share/mpv/scripts/skip.lua
install -Dm 755 ani-skip $out/bin/ani-skip
runHook postInstall
'';
postFixup = ''
substituteInPlace $out/bin/ani-skip \
--replace-fail '--script-opts=%s' "--script=$out/share/mpv/scripts/skip.lua --script-opts=%s"
wrapProgram $out/bin/ani-skip \
--prefix PATH : ${lib.makeBinPath finalAttrs.runtimeInputs}
'';
meta = {
homepage = "https://github.com/synacktraa/ani-skip";
description = "Automated solution to bypassing anime opening and ending sequences";
mainProgram = "ani-skip";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.diniamo ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,42 @@
{
lib,
allegro5,
cmake,
fetchFromGitLab,
libGL,
stdenv,
xorg,
}:
stdenv.mkDerivation rec {
pname = "animatch";
version = "1.0.3";
src = fetchFromGitLab {
owner = "HolyPangolin";
repo = "animatch";
fetchSubmodules = true;
tag = "v${version}";
hash = "sha256-zBV45WMAXtCpPPbDpr04K/a9UtZ4KLP9nUauBlbhrFo=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
allegro5
libGL
xorg.libX11
];
cmakeFlags = [
"-DLIBSUPERDERPY_STATIC=ON" # recommended by upstream for coexistence with other superderpy games
];
meta = {
homepage = "https://gitlab.com/HolyPangolin/animatch/";
description = "Cute match three game for the Librem 5 smartphone";
mainProgram = "animatch";
license = with lib.licenses; [ gpl3Plus ];
maintainers = with lib.maintainers; [ colinsane ];
};
}

View File

@@ -0,0 +1,66 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication {
pname = "animdl";
version = "1.7.27";
pyproject = true;
src = fetchFromGitHub {
owner = "justfoolingaround";
repo = "animdl";
# Using the commit hash because upstream does not have releases. https://github.com/justfoolingaround/animdl/issues/277
rev = "c7c3b79198e66695e0bbbc576f9d9b788616957f";
hash = "sha256-kn6vCCFhJNlruxoO+PTHVIwTf1E5j1aSdBhrFuGzUq4=";
};
pythonRemoveDeps = [
"comtypes" # windows only
];
pythonRelaxDeps = [
"cssselect"
"httpx"
"lxml"
"packaging"
"pycryptodomex"
"regex"
"rich"
"tqdm"
"yarl"
];
build-system = with python3Packages; [
poetry-core
];
dependencies = with python3Packages; [
anchor-kr
anitopy
click
cssselect
httpx
lxml
packaging
pkginfo
pycryptodomex
pyyaml
regex
rich
tqdm
yarl
];
doCheck = true;
meta = with lib; {
description = "Highly efficient, powerful and fast anime scraper";
homepage = "https://github.com/justfoolingaround/animdl";
license = licenses.gpl3Only;
mainProgram = "animdl";
maintainers = with maintainers; [ passivelemon ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
python3,
aria2,
mpv,
nodejs,
qt5,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "anime-downloader";
version = "5.0.14";
format = "setuptools";
src = fetchFromGitHub {
owner = "anime-dl";
repo = "anime-downloader";
tag = version;
sha256 = "sha256-Uk2mtsSrb8fCD9JCFzvLBzMEB7ViVDrKPSOKy9ALJ6o=";
};
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
propagatedBuildInputs = [
aria2
mpv
nodejs
]
++ (with python3.pkgs; [
beautifulsoup4
cfscrape
click
coloredlogs
fuzzywuzzy
jsbeautifier
pycryptodome
pysmartdl
pyqt5
requests
requests-cache
selenium
tabulate
]);
preFixup = ''
wrapQtApp "$out/bin/anime" --prefix PATH : ${lib.makeBinPath propagatedBuildInputs}
'';
doCheck = false;
# FIXME: checks must be disabled because they are lacking the qt env.
# They fail like this, even if built and wrapped with all Qt and runtime dependencies.
# Ref.: https://github.com/NixOS/nixpkgs/blob/634141959076a8ab69ca2cca0f266852256d79ee/pkgs/applications/misc/openlp/lib.nix#L20-L23
passthru.updateScript = ./update.sh;
meta = with lib; {
homepage = "https://github.com/anime-dl/anime-downloader";
description = "Simple but powerful anime downloader and streamer";
license = licenses.unlicense;
platforms = platforms.linux;
maintainers = [ ];
mainProgram = "anime";
};
}

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -eu -o pipefail
version="$(curl --silent "https://api.github.com/repos/anime-dl/anime-downloader/releases" | jq '.[0].tag_name' --raw-output)"
update-source-version anime-downloader "$version"

View File

@@ -0,0 +1,33 @@
{
fetchFromGitHub,
lib,
stdenvNoCC,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "anime4k";
version = "4.0.1";
src = fetchFromGitHub {
owner = "bloc97";
repo = "Anime4k";
tag = "v${finalAttrs.version}";
hash = "sha256-OQWJWcDpwmnJJ/kc4uEReaO74dYFlxNQwf33E5Oagb0=";
};
installPhase = ''
runHook preInstall
install -Dm644 glsl/*/*.glsl -t $out
runHook postInstall
'';
meta = with lib; {
description = "High-quality real time upscaler for anime";
homepage = "https://github.com/bloc97/Anime4K";
license = licenses.mit;
maintainers = with maintainers; [ surfaceflinger ];
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "ankacoder-condensed";
version = "1.100";
src = fetchzip {
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/anka-coder-fonts/AnkaCoderCondensed.${version}.zip";
stripRoot = false;
hash = "sha256-NHrkV4Sb7i+DC4e4lToEYzah3pI+sKyYf2rGbhWj7iY=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype
runHook postInstall
'';
meta = with lib; {
description = "Anka/Coder Condensed font";
homepage = "https://code.google.com/archive/p/anka-coder-fonts";
license = licenses.ofl;
maintainers = [ ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "ankacoder";
version = "1.100";
src = fetchzip {
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/anka-coder-fonts/AnkaCoder.${version}.zip";
stripRoot = false;
hash = "sha256-14ItaSQ/fO/WDq0O4SXGWnZgiM0kayJrWQgsKb7bsyY=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype
runHook postInstall
'';
meta = with lib; {
description = "Anka/Coder fonts";
homepage = "https://code.google.com/archive/p/anka-coder-fonts";
license = licenses.ofl;
maintainers = [ ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
appimageTools,
fetchurl,
}:
let
pname = "ankama-launcher";
version = "3.13.16";
# The original URL for the launcher is:
# https://launcher.cdn.ankama.com/installers/production/Ankama%20Launcher-Setup-x86_64.AppImage
# As it does not encode the version, we use the wayback machine (web.archive.org) to get a fixed URL.
# To update the client, head to web.archive.org and create a new snapshot of the download page.
src = fetchurl {
url = "https://web.archive.org/web/20250906013556/https://launcher.cdn.ankama.com/installers/production/Ankama%20Launcher-Setup-x86_64.AppImage";
hash = "sha256-wG7xg6uQJsdJR9Xu2T9PCVQb+LSyO10BveGftOrc2Uo=";
};
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.wine ];
extraInstallCommands = ''
desktop_file="${appimageContents}/zaap.desktop"
nix_version="${version}"
archive_version=$(grep -oP '(?<=X-AppImage-Version=).*' $desktop_file)
if [[ "$archive_version" != "$nix_version"* ]]; then
echo "ERROR - Version mismatch:"
echo -e "\t- Expected (pkgs.ankama-launcher.version): $nix_version"
echo -e "\t- Version found in 'zaap.desktop': $archive_version"
echo -e "\n-> Update the version attribute of the derivation."
echo "-> Note: Ignore the last part of the version: Do not write '3.12.24.19260' but '3.12.24'."
exit 1
fi
install -m 444 -D "$desktop_file" $out/share/applications/ankama-launcher.desktop
sed -i 's/.*Exec.*/Exec=ankama-launcher/' $out/share/applications/ankama-launcher.desktop
install -m 444 -D ${appimageContents}/zaap.png $out/share/icons/hicolor/256x256/apps/zaap.png
'';
meta = {
description = "Ankama Launcher";
longDescription = ''
Ankama Launcher is a portal that allows you to access Ankama's video games, VOD animations, webtoons, and livestreams, as well as download updates, stay up to date with the latest news, and chat with your friends.
'';
homepage = "https://www.ankama.com/en/launcher";
license = lib.licenses.unfree;
mainProgram = "ankama-launcher";
maintainers = with lib.maintainers; [ harbiinger ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "anko";
version = "0.1.9";
src = fetchFromGitHub {
owner = "mattn";
repo = "anko";
tag = "v${version}";
hash = "sha256-ZVNkQu5IxBx3f+FkUWc36EOEcY176wQJ2ravLPQAHAA=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Scriptable interpreter written in golang";
homepage = "https://github.com/mattn/anko";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "annapurna-sil";
version = "2.100";
src = fetchzip {
url = "https://software.sil.org/downloads/r/annapurna/AnnapurnaSIL-${version}.zip";
hash = "sha256-TFaCchtd9SRGsU9r+m8QOvZfc7/FJxwclkSfbLwf6/4=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttf -t $out/share/fonts/truetype
install -Dm644 OFL.txt OFL-FAQ.txt README.txt FONTLOG.txt -t $out/share/doc/${pname}-${version}
runHook postInstall
'';
meta = with lib; {
homepage = "https://software.sil.org/annapurna";
description = "Unicode-based font family with broad support for writing systems that use the Devanagari script";
longDescription = ''
Annapurna SIL is a Unicode-based font family with broad support for writing systems that use the Devanagari script. Inspired by traditional calligraphic forms, the design is intended to be highly readable, reasonably compact, and visually attractive.
'';
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.kmein ];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
python3,
fetchFromGitLab,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "annextimelog";
version = "0.15.0";
format = "pyproject";
src = fetchFromGitLab {
owner = "nobodyinperson";
repo = "annextimelog";
tag = "v${version}";
hash = "sha256-RfqBtbfArFva3TVJGF4STx0QTio62qxXaM23lsLYLUg=";
};
pythonRelaxDeps = [ "rich" ];
nativeBuildInputs = with python3.pkgs; [
unittestCheckHook
setuptools
wheel
poetry-core
tzdata
];
unittestFlags = [ "-vb" ];
propagatedBuildInputs = with python3.pkgs; [
rich
];
meta = with lib; {
description = "git-annex based cli time tracker";
homepage = "https://gitlab.com/nobodyinperson/annextimelog";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ matthiasbeyer ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "annotation-mono";
version = "0.2";
src = fetchzip {
url = "https://github.com/qwerasd205/AnnotationMono/releases/download/v${finalAttrs.version}/AnnotationMono_v${finalAttrs.version}.zip";
hash = "sha256-81BcPYE4C9kuetiCzgGPl59WO4QkBML7dwAkD1DCCZo=";
stripRoot = false;
};
installPhase = ''
runHook preInstall
install -D -m444 -t $out/share/fonts/truetype $src/dist/ttf/*.ttf
install -D -m444 -t $out/share/fonts/truetype $src/dist/variable/AnnotationMono-VF.ttf
install -D -m444 -t $out/share/fonts/opentype $src/dist/otf/*.otf
runHook postInstall
'';
meta = {
homepage = "https://github.com/qwerasd205/AnnotationMono";
description = "Lovingly crafted handwriting-style monospace font";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.theonlymrcat ];
};
})

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
meson,
ninja,
vala,
wrapGAppsHook4,
desktop-file-utils,
gtk3,
libgee,
pantheon,
libxml2,
libhandy,
libportal-gtk4,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "annotator";
version = "2.0.0";
src = fetchFromGitHub {
owner = "phase1geo";
repo = "annotator";
tag = finalAttrs.version;
hash = "sha256-mv3fMlYB4XcAWI6O6wN8ujNRDLZlX3ef/gKdOMYEHq0=";
};
postPatch = ''
substituteInPlace src/Application.vala \
--replace-fail 'Environment.set_variable( "GDK_BACKEND", "x11", true );' ""
'';
nativeBuildInputs = [
pkg-config
meson
ninja
vala
wrapGAppsHook4
desktop-file-utils
];
buildInputs = [
libgee
pantheon.granite7
libportal-gtk4
libxml2
libhandy
gtk3
];
meta = {
description = "Image annotation for Elementary OS";
homepage = "https://github.com/phase1geo/Annotator";
license = lib.licenses.gpl3Plus;
mainProgram = "com.github.phase1geo.annotator";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,41 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "anonymouspro";
version = "1.002";
src = fetchzip {
url = "https://www.marksimonson.com/assets/content/fonts/AnonymousPro-${
lib.replaceStrings [ "." ] [ "_" ] version
}.zip";
hash = "sha256-FhyzV4By8XKN9EyukAknzml/7lUuV6Evnt6Ht3H6TUU=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttf -t $out/share/fonts/truetype
install -Dm644 *.txt -t $out/share/doc/${pname}-${version}
runHook postInstall
'';
meta = with lib; {
homepage = "https://www.marksimonson.com/fonts/view/anonymous-pro";
description = "TrueType font set intended for source code";
longDescription = ''
Anonymous Pro (2009) is a family of four fixed-width fonts
designed with coding in mind. Anonymous Pro features an
international, Unicode-based character set, with support for
most Western and Central European Latin-based languages, plus
Greek and Cyrillic. It is designed by Mark Simonson.
'';
maintainers = with maintainers; [ raskin ];
license = licenses.ofl;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,16 @@
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 71a110a7b..e69880d46 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -38,11 +38,6 @@ if(NOT WIN32)
# find the correct file.
set(DESKTOP_ANSEL_BINARY "ansel")
set(DESKTOP_ANSEL_ICON "ansel")
- if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
- set(DESKTOP_ANSEL_BINARY "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/ansel")
- # `hicolor` is always available.
- set(DESKTOP_ANSEL_ICON "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps/ansel.svg")
- endif()
# Append supported MIME types dynamically.
if("avif" IN_LIST DT_SUPPORTED_EXTENSIONS)

View File

@@ -0,0 +1,190 @@
{
bash,
cmake,
colord,
colord-gtk,
curl,
dav1d,
desktop-file-utils,
exiftool,
exiv2,
fetchFromGitHub,
glib,
gmic,
graphicsmagick,
gtk3,
icu,
intltool,
isocodes,
jasper,
json-glib,
lcms,
lensfun,
lerc,
lib,
libaom,
libavif,
libdatrie,
libde265,
libepoxy,
libffi,
libgcrypt,
libgpg-error,
libheif,
libjpeg,
libpsl,
librsvg,
libsecret,
libselinux,
libsepol,
libsoup_3,
libsysprof-capture,
libthai,
libwebp,
libXdmcp,
libxkbcommon,
libxml2,
libXtst,
llvmPackages,
openexr,
openjpeg,
osm-gps-map,
pcre2,
perlPackages,
pkg-config,
pugixml,
python3Packages,
rav1e,
saxon,
sqlite,
stdenv,
unstableGitUpdater,
util-linux,
wrapGAppsHook3,
x265,
}:
let
# requires libavif 0.x, see https://github.com/aurelienpierreeng/ansel/blob/e2c4a0a60cd80f741dd3d3c6ab72be9ac11234fb/src/CMakeLists.txt#L356
libavif_0_11 = libavif.overrideAttrs rec {
version = "0.11.1";
src = fetchFromGitHub {
owner = "AOMediaCodec";
repo = "libavif";
tag = "v${version}";
hash = "sha256-mUi0DU99XV3FzUZ8/9uJZU+W3fc6Bk6+y6Z78IRZ9Qs=";
};
patches = [ ];
doCheck = false;
};
in
stdenv.mkDerivation {
pname = "ansel";
version = "0-unstable-2025-10-04";
src = fetchFromGitHub {
owner = "aurelienpierreeng";
repo = "ansel";
rev = "dd5b73cd78d32618aca3f81a041e45c8d2adcece";
hash = "sha256-x8glXiweW1/mzPjGrGRDeCHIG1GqbjvEmAM4sEhor14=";
fetchSubmodules = true;
};
patches = [
# don't use absolute paths to binary or icon - see https://github.com/NixOS/nixpkgs/issues/308324
./fix-desktop-file.patch
];
strictDeps = true;
nativeBuildInputs = [
cmake
desktop-file-utils
exiftool
intltool
llvmPackages.llvm
pkg-config
perlPackages.perl
python3Packages.jsonschema
wrapGAppsHook3
saxon
];
buildInputs = [
bash # for patchShebangs to patch scripts in share/ansel/tools/
colord
colord-gtk
curl
dav1d
exiv2
json-glib
glib
gmic
graphicsmagick
gtk3
icu
isocodes
jasper
lcms
lensfun
lerc
libaom
libavif
libdatrie
libde265
libepoxy
libffi
libgcrypt
libgpg-error
libheif
libjpeg
libpsl
librsvg
libsecret
libselinux
libsepol
libsoup_3
libsysprof-capture
libthai
libwebp
libXdmcp
libxkbcommon
libxml2
libXtst
openexr
openjpeg
osm-gps-map
pcre2
perlPackages.Po4a
pugixml
rav1e
sqlite
util-linux
x265
];
preFixup = ''
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH ":" "$out/lib/ansel"
)
'';
cmakeFlags = [
"-DBINARY_PACKAGE_BUILD=1"
];
passthru.updateScript = unstableGitUpdater {
# Tags inherited from Darktable, + a "nightly" 0.0.0 tag that new artefacts get attached to
hardcodeZeroVersion = true;
};
meta = {
description = "Darktable fork minus the bloat plus some design vision";
homepage = "https://ansel.photos/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ mBornand ];
mainProgram = "ansel";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,29 @@
{
fetchCrate,
lib,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "ansi-escape-sequences-cli";
version = "0.2.2";
src = fetchCrate {
inherit pname version;
hash = "sha256-55CdEw1bVgabWRbZIRe9jytwDf70Y92nITwDRQaTXaQ=";
};
cargoHash = "sha256-g+FP98lcC3EeQtcGO0kE+g6Z9tUgrlieTlVJYKs/ig4=";
meta = {
description = "Quickly get ANSI escape sequences";
longDescription = ''
CLI utility called "ansi" to quickly get ANSI escape sequences. Supports
the colors and styles, such as bold or italic.
'';
homepage = "https://github.com/phip1611/ansi-escape-sequences-cli";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ phip1611 ];
mainProgram = "ansi";
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
fetchFromGitHub,
replaceVars,
python3Packages,
testers,
ansible-cmdb,
}:
let
inherit (python3Packages)
setuptools
mako
pyyaml
jsonxs
buildPythonApplication
;
pname = "ansible-cmdb";
version = "1.31";
in
buildPythonApplication {
inherit pname version;
pyproject = true;
src = fetchFromGitHub {
owner = "fboender";
repo = "ansible-cmdb";
tag = version;
hash = "sha256-HOFLX8fiid+xJOVYNyVbz5FunrhteAUPlvS3ctclVHo=";
};
patches = [
(replaceVars ./setup.patch {
inherit version;
})
];
build-system = [ setuptools ];
dependencies = [
mako
pyyaml
jsonxs
];
passthru.tests.version = testers.testVersion {
package = ansible-cmdb;
version = "v${version}";
};
meta = {
description = "Generate host overview from ansible fact gathering output";
homepage = "https://github.com/fboender/ansible-cmdb";
license = lib.licenses.gpl3Only;
maintainers = [ lib.maintainers.tie ];
mainProgram = "ansible-cmdb";
};
}

View File

@@ -0,0 +1,41 @@
diff --git a/src/ansible-cmdb.py b/bin/ansible-cmdb
similarity index 100%
rename from src/ansible-cmdb.py
rename to bin/ansible-cmdb
diff --git a/setup.py b/setup.py
index a8db25d..c1670f1 100755
--- a/setup.py
+++ b/setup.py
@@ -42,17 +42,16 @@ setup(
package_dir={'': 'src'},
packages=find_packages('src'),
include_package_data=True,
- data_files=\
- get_data_files(
- 'src/ansiblecmdb/data',
- strip='src',
- prefix='lib'
- ) +
- [['lib/ansiblecmdb/', ['src/ansible-cmdb.py']]],
+ data_files=get_data_files(
+ 'src/ansiblecmdb/data',
+ strip='src',
+ prefix='lib',
+ ),
zip_safe=False,
- install_requires=['mako', 'pyyaml', 'ushlex', 'jsonxs'],
+ install_requires=['mako', 'pyyaml'],
+ extras_require={'jsonxs_templates': ['jsonxs']},
scripts=[
- 'src/ansible-cmdb',
+ 'bin/ansible-cmdb',
],
classifiers=[
diff --git a/src/ansiblecmdb/data/VERSION b/src/ansiblecmdb/data/VERSION
index 79d94e6..14d2ff6 100644
--- a/src/ansiblecmdb/data/VERSION
+++ b/src/ansiblecmdb/data/VERSION
@@ -1 +1 @@
-MASTER
+@version@

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
python3Packages,
fetchFromGitHub,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "ansible-doctor";
version = "7.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "thegeeklab";
repo = "ansible-doctor";
tag = "v${version}";
hash = "sha256-2cJ1wV3hqoqSvLq3c7/J5nh1GTTcj9sexRhX3hfPoTc=";
};
build-system = with python3Packages; [
poetry-core
poetry-dynamic-versioning
];
dependencies = with python3Packages; [
anyconfig
appdirs
colorama
dynaconf
environs
gitpython
jinja2
jsonschema
nested-lookup
pathspec
python-json-logger
ruamel-yaml
structlog
];
pythonRelaxDeps = true;
doCheck = true;
pythonImportsCheck = [ "ansibledoctor" ];
# ansible.errors.AnsibleError: Unable to create local directories(/private/var/empty/.ansible/tmp)
nativeCheckInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
description = "Annotation based documentation for your Ansible roles";
mainProgram = "ansible-doctor";
homepage = "https://github.com/thegeeklab/ansible-doctor";
changelog = "https://github.com/thegeeklab/ansible-doctor/releases/tag/${src.tag}";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [ tboerger ];
};
}

View File

@@ -0,0 +1,104 @@
{
lib,
python3Packages,
fetchPypi,
ansible,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
pname = "ansible-lint";
version = "25.8.2";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "ansible_lint";
hash = "sha256-Nd093RLYBjh2kVvy8GuaG4D9J6fLHKTOUcjOu4RpCSI=";
};
postPatch = ''
# it is fine if lint tools are missing
substituteInPlace conftest.py \
--replace-fail "sys.exit(1)" ""
'';
build-system = with python3Packages; [
setuptools
setuptools-scm
];
dependencies = with python3Packages; [
# https://github.com/ansible/ansible-lint/blob/master/.config/requirements.in
ansible-core
ansible-compat
black
filelock
importlib-metadata
jsonschema
packaging
pyyaml
rich
ruamel-yaml
subprocess-tee
wcmatch
yamllint
];
pythonRelaxDeps = [ "ruamel.yaml" ];
# tests can't be easily run without installing things from ansible-galaxy
doCheck = false;
nativeCheckInputs =
with python3Packages;
[
flaky
pytest-xdist
pytestCheckHook
]
++ [
writableTmpDirAsHomeHook
ansible
];
preCheck = ''
# create a working ansible-lint executable
export PATH=$PATH:$PWD/src/ansiblelint
ln -rs src/ansiblelint/__main__.py src/ansiblelint/ansible-lint
patchShebangs src/ansiblelint/__main__.py
# create symlink like in the git repo so test_included_tasks does not fail
ln -s ../roles examples/playbooks/roles
'';
disabledTests = [
# requires network
"test_cli_auto_detect"
"test_install_collection"
"test_prerun_reqs_v1"
"test_prerun_reqs_v2"
"test_require_collection_wrong_version"
# re-execs ansible-lint which does not works correct
"test_custom_kinds"
"test_run_inside_role_dir"
"test_run_multiple_role_path_no_trailing_slash"
"test_runner_exclude_globs"
"test_discover_lintables_umlaut"
];
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible ]}" ];
meta = {
description = "Best practices checker for Ansible";
mainProgram = "ansible-lint";
homepage = "https://github.com/ansible/ansible-lint";
changelog = "https://github.com/ansible/ansible-lint/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
sengaya
HarisDotParis
robsliwi
];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
python3Packages,
podman,
fetchPypi,
ansible-lint,
}:
python3Packages.buildPythonApplication rec {
pname = "ansible-navigator";
version = "25.9.0";
pyproject = true;
disabled = python3Packages.pythonOlder "3.10";
src = fetchPypi {
inherit version;
pname = "ansible_navigator";
hash = "sha256-DgRm1y/87gAGRcTX1ZB2Cb4eRWZFdR0KEvzcYPGosYY=";
};
build-system = with python3Packages; [
setuptools
setuptools-scm
];
dependencies = with python3Packages; [
ansible-builder
ansible-runner
jinja2
jsonschema
tzdata
pyyaml
onigurumacffi
ansible-lint
podman
];
# Tests want to run in tmux
doCheck = false;
pythonImportsCheck = [ "ansible_navigator" ];
meta = {
description = "Text-based user interface (TUI) for Ansible";
homepage = "https://ansible.readthedocs.io/projects/navigator/";
changelog = "https://github.com/ansible/ansible-navigator/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ melkor333 ];
};
}

View File

@@ -0,0 +1,47 @@
{
fetchurl,
lib,
stdenv,
pkg-config,
boost,
lua,
}:
stdenv.mkDerivation rec {
pname = "ansifilter";
version = "2.22";
src = fetchurl {
url = "http://www.andre-simon.de/zip/ansifilter-${version}.tar.bz2";
hash = "sha256-zP9BynQLgTv5EDhotQAPQkPTKnUwTqkpohTEm5Q+zJM=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
boost
lua
];
postPatch = ''
# avoid timestamp non-determinism with '-n'
substituteInPlace makefile --replace 'gzip -9f' 'gzip -9nf'
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
"conf_dir=/etc/ansifilter"
];
meta = with lib; {
description = "Tool to convert ANSI to other formats";
mainProgram = "ansifilter";
longDescription = ''
Tool to remove ANSI or convert them to another format
(HTML, TeX, LaTeX, RTF, Pango or BBCode)
'';
homepage = "http://www.andre-simon.de/doku/ansifilter/en/ansifilter.html";
license = licenses.gpl3;
maintainers = [ maintainers.Adjective-Object ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
libansilove,
}:
stdenv.mkDerivation rec {
pname = "ansilove";
version = "4.2.1";
src = fetchFromGitHub {
owner = "ansilove";
repo = "ansilove";
tag = version;
hash = "sha256-13v2NLVJt11muwocBiQYz/rxQkte/W6LXwB/H/E9Nvk=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [ libansilove ];
meta = {
description = "ANSI and ASCII art to PNG converter in C";
homepage = "https://github.com/ansilove/ansilove";
changelog = "https://github.com/ansilove/ansilove/blob/${src.rev}/ChangeLog";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ jethair ];
mainProgram = "ansilove";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,117 @@
{
fetchurl,
lib,
stdenv,
coreutils,
makeWrapper,
gitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ant";
version = "1.10.15";
nativeBuildInputs = [ makeWrapper ];
src = fetchurl {
url = "mirror://apache/ant/binaries/apache-ant-${finalAttrs.version}-bin.tar.bz2";
hash = "sha256-h/SNGLoRwRVojDfvl1g+xv+J6mAz+J2BimckjaRxDEs=";
};
installPhase = ''
mkdir -p $out/bin $out/share/ant
mv * $out/share/ant/
# Get rid of the manual (35 MiB). Maybe we should put this in a
# separate output. Keep the antRun script since it's vanilla sh
# and needed for the <exec/> task (but since we set ANT_HOME to
# a weird value, we have to move antRun to a weird location).
# Get rid of the other Ant scripts since we provide our own.
mv $out/share/ant/bin/antRun $out/bin/
rm -rf $out/share/ant/{manual,bin,WHATSNEW}
mkdir $out/share/ant/bin
mv $out/bin/antRun $out/share/ant/bin/
cat >> $out/bin/ant <<EOF
#! ${stdenv.shell} -e
ANT_HOME=$out/share/ant
# Find the JDK by looking for javac. As a fall-back, find the
# JRE by looking for java. The latter allows just the JRE to be
# used with (say) ECJ as the compiler. Finally, allow the GNU
# JVM.
if [ -z "\''${JAVA_HOME-}" ]; then
for i in javac java gij; do
if p="\$(type -p \$i)"; then
export JAVA_HOME="\$(${coreutils}/bin/dirname \$(${coreutils}/bin/dirname \$(${coreutils}/bin/readlink -f \$p)))"
break
fi
done
if [ -z "\''${JAVA_HOME-}" ]; then
echo "\$0: cannot find the JDK or JRE" >&2
exit 1
fi
fi
if [ -z \$NIX_JVM ]; then
if [ -e \$JAVA_HOME/bin/java ]; then
NIX_JVM=\$JAVA_HOME/bin/java
elif [ -e \$JAVA_HOME/bin/gij ]; then
NIX_JVM=\$JAVA_HOME/bin/gij
else
NIX_JVM=java
fi
fi
LOCALCLASSPATH="\$ANT_HOME/lib/ant-launcher.jar\''${LOCALCLASSPATH:+:}\$LOCALCLASSPATH"
exec \$NIX_JVM \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" \
-Dant.home=\$ANT_HOME -Dant.library.dir="\$ANT_LIB" \
org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS \
-cp "\$CLASSPATH" "\$@"
EOF
chmod +x $out/bin/ant
'';
passthru = {
home = "${finalAttrs.finalPackage}/share/ant";
updateScript = gitUpdater {
rev-prefix = "rel/";
url = "https://gitbox.apache.org/repos/asf/ant";
};
};
meta = {
homepage = "https://ant.apache.org/";
description = "Java-based build tool";
mainProgram = "ant";
longDescription = ''
Apache Ant is a Java-based build tool. In theory, it is kind of like
Make, but without Make's wrinkles.
Why another build tool when there is already make, gnumake, nmake, jam,
and others? Because all those tools have limitations that Ant's
original author couldn't live with when developing software across
multiple platforms. Make-like tools are inherently shell-based -- they
evaluate a set of dependencies, then execute commands not unlike what
you would issue in a shell. This means that you can easily extend
these tools by using or writing any program for the OS that you are
working on. However, this also means that you limit yourself to the
OS, or at least the OS type such as Unix, that you are working on.
Ant is different. Instead of a model where it is extended with
shell-based commands, Ant is extended using Java classes. Instead of
writing shell commands, the configuration files are XML-based, calling
out a target tree where various tasks get executed. Each task is run
by an object that implements a particular Task interface.
'';
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
teams = [ lib.teams.java ];
platforms = lib.platforms.all;
};
})

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,81 @@
{
fetchFromGitHub,
lib,
buildNpmPackage,
electron,
nodejs,
makeDesktopItem,
copyDesktopItems,
icoutils,
}:
buildNpmPackage rec {
pname = "antares";
version = "0.7.29";
src = fetchFromGitHub {
owner = "antares-sql";
repo = "antares";
tag = "v${version}";
hash = "sha256-3zgr3Eefx3WDUW9/1NOaneUbFy3GTnJ3tGgivtW1K/g=";
};
npmDepsHash = "sha256-WJ5HVVa4rEOsvr52L/OGk+vlxRiKLJTxWmUnpN1FnbY=";
patches = [
# Since version 0.7.28, package-lock is not updated properly so this patch update it to be able to build the package
# This patch will probably be removed in the next version
# If it does not build without it, you just need to do a npm update in the antares project and copy the patch
./npm-lock.patch
];
buildInputs = [ nodejs ];
nativeBuildInputs = [
copyDesktopItems
icoutils
];
npmBuildScript = "compile";
installPhase = ''
runHook preInstall
npmInstallHook
cp -rf dist/* $out/lib/node_modules/antares
find -name "*.ts" | xargs rm -f
makeWrapper ${lib.getExe electron} $out/bin/antares \
--add-flags $out/lib/node_modules/antares/main.js
runHook postInstall
# Install icon files
mkdir -pv $out/share/icon/
icotool -x assets/icon.ico
cp icon_1_256x256x32.png $out/share/icon/antares.png
'';
npmFlags = [ "--legacy-peer-deps" ];
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "Antares SQL";
exec = pname;
icon = pname;
terminal = false;
type = "Application";
startupWMClass = pname;
comment = "A modern, fast and productivity driven SQL client with a focus in UX";
categories = [ "Development" ];
})
];
meta = {
description = "Modern, fast and productivity driven SQL client with a focus in UX";
homepage = "https://github.com/antares-sql/antares";
changelog = "https://github.com/antares-sql/antares/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ eymeric ];
};
}

View File

@@ -0,0 +1,76 @@
{
stdenv,
fetchFromGitHub,
lib,
zlib,
libffi,
libxml2,
llvmPackages_18,
ncurses,
darwin,
rustPlatform,
}:
rustPlatform.buildRustPackage {
pname = "ante";
version = "0-unstable-2025-07-12";
src = fetchFromGitHub {
owner = "jfecher";
repo = "ante";
rev = "e1f68f00937ae39badcc42a48c0078b608f294bf";
fetchSubmodules = true;
hash = "sha256-mbjV7S705bSseA/P31jiJiktpUEQ8hS+M4kcs2AM1/Y=";
};
cargoHash = "sha256-cRF1JFqWpGGQO3fIGcatVY1pp65CvNeM/6LFYDJxdpM=";
strictDeps = true;
nativeBuildInputs = [ llvmPackages_18.llvm ];
buildInputs = [
zlib
libffi
libxml2
ncurses
];
postPatch = ''
substituteInPlace tests/golden_tests.rs --replace-fail \
'target/debug' "target/$(rustc -vV | sed -n 's|host: ||p')/release"
substituteInPlace src/util/mod.rs \
--replace-fail '"gcc"' '"${lib.getExe llvmPackages_18.clang}"'
'';
preBuild =
let
major = lib.versions.major llvmPackages_18.llvm.version;
minor = lib.versions.minor llvmPackages_18.llvm.version;
llvm-sys-ver = "${major}${builtins.substring 0 1 minor}";
in
''
# On some architectures llvm-sys is not using the package listed inside nativeBuildInputs
export LLVM_SYS_${llvm-sys-ver}_PREFIX=${llvmPackages_18.llvm.dev}
export ANTE_STDLIB_DIR=$out/lib
mkdir -p $ANTE_STDLIB_DIR
cp -r $src/stdlib/* $ANTE_STDLIB_DIR
'';
# Ante uses the default LLVM target which, because we currently
# dont include a Darwin version in the target, seemingly defaults
# to the host macOS version, which makes `ld(1)` warn about the
# mismatching deployment targets, which breaks the tests.
#
# TODO: Remove this once it stops being necessary.
preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
export MACOSX_DEPLOYMENT_TARGET=$(
${lib.getExe' darwin.DarwinTools "sw_vers"} -productVersion
)
'';
meta = with lib; {
homepage = "https://antelang.org/";
description = "Low-level functional language for exploring refinement types, lifetime inference, and algebraic effects";
mainProgram = "ante";
license = with licenses; [ mit ];
maintainers = with maintainers; [ ehllie ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication {
pname = "antfs-cli";
version = "0-unstable-2017-02-11";
format = "pyproject";
meta = with lib; {
homepage = "https://github.com/Tigge/antfs-cli";
description = "Extracts FIT files from ANT-FS based sport watches";
mainProgram = "antfs-cli";
license = licenses.mit;
platforms = platforms.linux;
};
src = fetchFromGitHub {
owner = "Tigge";
repo = "antfs-cli";
rev = "85a6cc6fe6fc0ec38399f5aa30fb39177c565b52";
sha256 = "0v8y64kldfbs809j1g9d75dd1vxq7mfxnp4b45pz8anpxhjf64fy";
};
build-system = [ python3Packages.setuptools ];
dependencies = [ python3Packages.openant ];
}

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchurl,
buildPackages,
}:
stdenv.mkDerivation rec {
pname = "anthy";
version = "9100h";
postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
# for cross builds, copy build tools from the native package
cp -r "${buildPackages.anthy.dev}"/lib/internals/{mkdepgraph,.libs} depgraph/
cp -r "${buildPackages.anthy.dev}"/lib/internals/{mkworddic,.libs} mkworddic/
cp -r "${buildPackages.anthy.dev}"/lib/internals/{calctrans,.libs} calctrans/
cp -r "${buildPackages.anthy.dev}"/lib/internals/{mkfiledic,.libs} mkanthydic/
substituteInPlace mkworddic/Makefile.in \
--replace-fail 'anthy.wdic : mkworddic' 'anthy.wdic : ' \
--replace-fail 'all: ' 'all: anthy.wdic #'
substituteInPlace calctrans/Makefile.in \
--replace-fail '$(dict_source_files): $(srcdir)/corpus_info $(srcdir)/weak_words calctrans' \
'$(dict_source_files): $(srcdir)/corpus_info $(srcdir)/weak_words' \
--replace-fail 'all-am: Makefile $(PROGRAMS) $(DATA)' 'all-am: $(DATA)'
substituteInPlace depgraph/Makefile.in \
--replace-fail 'anthy.dep : mkdepgraph' 'anthy.dep : ' \
--replace-fail 'all-am: Makefile $(PROGRAMS) $(DATA)' 'all-am: $(DATA)'
substituteInPlace mkanthydic/Makefile.in \
--replace-fail 'anthy.dic : mkfiledic' 'anthy.dic : ' \
--replace-fail 'all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)' 'all-am: $(DATA)'
'';
outputs = [
"out"
"dev"
];
meta = with lib; {
description = "Hiragana text to Kana Kanji mixed text Japanese input method";
homepage = "https://anthy.osdn.jp/";
license = licenses.gpl2Plus;
maintainers = [ ];
platforms = platforms.unix;
};
postFixup = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
# not relevant for installed package
mkdir "$dev/lib/internals"
cp -r depgraph/{mkdepgraph,.libs} mkworddic/{mkworddic,.libs} calctrans/{calctrans,.libs} mkanthydic/{mkfiledic,.libs} "$dev/lib/internals"
'';
src = fetchurl {
url = "mirror://osdn/anthy/37536/anthy-${version}.tar.gz";
sha256 = "0ism4zibcsa5nl77wwi12vdsfjys3waxcphn1p5s7d0qy1sz0mnj";
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "antibody";
version = "6.1.1";
src = fetchFromGitHub {
owner = "getantibody";
repo = "antibody";
tag = "v${version}";
hash = "sha256-If7XAwtg1WqkDkrJ6qYED+DjwHWloPu3P7X9rUd5ikU=";
};
vendorHash = "sha256-0m+yDo+AMX5tZfOsjsZgulyjB9mVEjy2RfA2sYeqDn0=";
doCheck = false;
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
meta = with lib; {
description = "Fastest shell plugin manager";
mainProgram = "antibody";
homepage = "https://github.com/getantibody/antibody";
license = licenses.mit;
maintainers = with maintainers; [ Br1ght0ne ];
# golang.org/x/sys needs to be updated due to:
#
# https://github.com/golang/go/issues/49219
#
# but this package is no longer maintained.
#
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
version = "1.9.10";
pname = "antidote";
src = fetchFromGitHub {
owner = "mattmc3";
repo = "antidote";
tag = "v${finalAttrs.version}";
hash = "sha256-+hp8L1Pcqx/Jly1H6F23U4WD6MkVAAZZpPrbc/VSurM=";
};
dontPatch = true;
dontBuild = true;
dontConfigure = true;
dontFixup = true;
installPhase = ''
runHook preInstall
install -D antidote --target-directory=$out/share/antidote
install -D antidote.zsh --target-directory=$out/share/antidote
install -D functions/* --target-directory=$out/share/antidote/functions
runHook postInstall
'';
meta = {
description = "Zsh plugin manager made from the ground up thinking about performance";
homepage = "https://getantidote.github.io/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.hitsmaxft ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
version = "2.2.3";
pname = "antigen";
src = fetchurl {
url = "https://github.com/zsh-users/antigen/releases/download/v${version}/antigen.zsh";
sha256 = "1bmp3qf14509swpxin4j9f98n05pdilzapjm0jdzbv0dy3hn20ix";
};
strictDeps = true;
dontUnpack = true;
installPhase = ''
outdir=$out/share/antigen
mkdir -p $outdir
cp $src $outdir/antigen.zsh
'';
meta = {
description = "Plugin manager for zsh";
homepage = "https://antigen.sharats.me/";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,14 @@
const { app, BrowserWindow } = require('electron');
app.setName(process.env.ELECTRON_APP_NAME || 'Antimatter Dimensions');
app.whenReady().then(() => {
const mainWindow = new BrowserWindow({
autoHideMenuBar: true,
});
mainWindow.loadFile('index.html');
});
app.on('window-all-closed', () => {
app.quit();
});

View File

@@ -0,0 +1,83 @@
{
buildNpmPackage,
copyDesktopItems,
electron,
fetchFromGitHub,
lib,
makeDesktopItem,
unstableGitUpdater,
writeScriptBin,
electronAppName ? "Antimatter Dimensions",
}:
let
# build doesn't provide app.js, only index.html as entry point.
# app.js is used to change the directory where data is stored
# instead of default Electron. This workaround will be removed
# when this file will be available in upstream repository.
dummyElectronApp = ./app.js;
in
buildNpmPackage rec {
pname = "antimatter-dimensions";
version = "0-unstable-2025-09-17";
src = fetchFromGitHub {
owner = "IvarK";
repo = "AntimatterDimensionsSourceCode";
rev = "8b5a34c1211df7cb35969dc8e5d402b0b28b7589";
hash = "sha256-ptyLpGtHHhsPBS//LpuO327uXPqQWTs1DLGjcsrvZtw=";
};
nativeBuildInputs = [
copyDesktopItems
# build script calls git to get git hash, message and author
# since fetchFromGitHub doesn't provide this information
# and in order to keep determinism (#8567), create a dummy git
(writeScriptBin "git" ''
echo "unknown"
'')
];
npmDepsHash = "sha256-aG+oysgitQvdFM0QyzJ3DBxsanBHYI+UPJPhj6bf00Q=";
npmFlags = [ "--legacy-peer-deps" ];
npmBuildScript = "build:release";
installPhase = ''
runHook preInstall
mkdir -p $out/share/antimatter-dimensions
cp -Tr dist $out/share/antimatter-dimensions
mkdir -p $out/share/icons/hicolor/256x256/apps
ln -rs $out/share/antimatter-dimensions/icon.png $out/share/icons/hicolor/256x256/apps/antimatter-dimensions.png
cp ${dummyElectronApp} $out/share/antimatter-dimensions/app.js
makeWrapper ${lib.getExe electron} $out/bin/antimatter-dimensions \
--add-flags $out/share/antimatter-dimensions/app.js \
--set ELECTRON_APP_NAME "${electronAppName}"
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "antimatter-dimensions";
exec = "antimatter-dimensions";
icon = "antimatter-dimensions";
desktopName = electronAppName;
comment = meta.description;
categories = [ "Game" ];
terminal = false;
})
];
passthru.updateScript = unstableGitUpdater {
hardcodeZeroVersion = true;
};
meta = {
homepage = "https://github.com/IvarK/AntimatterDimensionsSourceCode";
description = "Idle incremental game with multiple prestige layers";
license = lib.licenses.mit;
mainProgram = "antimatter-dimensions";
maintainers = with lib.maintainers; [ amozeo ];
inherit (electron.meta) platforms;
};
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-antimony">
<comment xml:lang="en">Antimony model</comment>
<glob pattern="*.sb"/>
</mime-type>
</mime-info>

View File

@@ -0,0 +1,100 @@
{
lib,
stdenv,
fetchFromGitHub,
libpng,
python3,
libGLU,
libGL,
libsForQt5,
ncurses,
cmake,
flex,
lemon,
makeDesktopItem,
copyDesktopItems,
}:
let
gitRev = "8b805c674adad536f9dd552b4be75fadcb3c7db6";
gitBranch = "develop";
gitTag = "0.9.3";
in
stdenv.mkDerivation {
pname = "antimony";
version = "2022-11-23";
src = fetchFromGitHub {
owner = "mkeeter";
repo = "antimony";
rev = gitRev;
sha256 = "NmOuBewfHqtAim2cNP62LXgRjVWuVUGweV46sY1qjGk=";
};
patches = [ ./paths-fix.patch ];
postPatch = ''
sed -i "s,/usr/local,$out,g" \
app/CMakeLists.txt app/app/app.cpp app/app/main.cpp
sed -i "s,python3,${python3.executable}," CMakeLists.txt
'';
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
install -Dm644 $src/deploy/icon.svg $out/share/icons/hicolor/scalable/apps/antimony.svg
install -Dm644 ${./mimetype.xml} $out/share/mime/packages/antimony.xml
'';
buildInputs = [
libpng
python3
python3.pkgs.boost
libGLU
libGL
libsForQt5.qtbase
ncurses
];
nativeBuildInputs = [
cmake
flex
lemon
libsForQt5.wrapQtAppsHook
copyDesktopItems
];
desktopItems = [
(makeDesktopItem {
name = "antimony";
desktopName = "Antimony";
comment = "Tree-based Modeler";
genericName = "CAD Application";
exec = "antimony %f";
icon = "antimony";
categories = [
"Graphics"
"Science"
"Engineering"
];
mimeTypes = [
"application/x-extension-sb"
"application/x-antimony"
];
startupWMClass = "antimony";
})
];
cmakeFlags = [
"-DGITREV=${gitRev}"
"-DGITTAG=${gitTag}"
"-DGITBRANCH=${gitBranch}"
];
meta = {
description = "Computer-aided design (CAD) tool from a parallel universe";
mainProgram = "antimony";
homepage = "https://github.com/mkeeter/antimony";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ rnhmjoj ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,21 @@
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index ddc5c9b..d80728a 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -158,16 +158,6 @@ target_link_libraries(${ANTIMONY_APP}
################################################################################
-execute_process(COMMAND git log --pretty=format:'%h' -n 1
- OUTPUT_VARIABLE GITREV)
-execute_process(COMMAND bash -c "git diff --quiet --exit-code || echo +"
- OUTPUT_VARIABLE GITDIFF)
-execute_process(COMMAND git describe --exact-match --tags
- OUTPUT_VARIABLE GITTAG
- ERROR_QUIET)
-execute_process(COMMAND git rev-parse --abbrev-ref HEAD
- OUTPUT_VARIABLE GITBRANCH)
-
add_definitions(-D'GITREV="${GITREV}${GITDIFF}"'
-D'GITTAG="${GITTAG}"'
-D'GITBRANCH="${GITBRANCH}"')

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
libX11,
libGL,
libGLU,
libglut,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "antiprism";
version = "0.32";
src = fetchFromGitHub {
owner = "antiprism";
repo = "antiprism";
tag = finalAttrs.version;
hash = "sha256-0FkaIsZixYHP45H0gytnzlpRvNd8mMYjW22w15z3RH8=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
libX11
libGLU
libGL
libglut
];
meta = with lib; {
homepage = "https://www.antiprism.com";
description = "Collection of programs for generating, manipulating, transforming and viewing polyhedra";
license = with licenses; [ mit ];
maintainers = [ ];
};
})

View File

@@ -0,0 +1,18 @@
Description: Add check for buffer overflow with malformed input files
Author: <eriks@debian.org>
Bug-Debian: http://bugs.debian.org/407015
Last-Update: 2009-06-03
--- antiword-0.37~/wordole.c 2005-08-26 21:49:57.000000000 +0200
+++ antiword-0.37/wordole.c 2009-06-03 22:31:15.948014682 +0200
@@ -259,6 +259,10 @@
}
tNameSize = (size_t)usGetWord(0x40, aucBytes);
tNameSize = (tNameSize + 1) / 2;
+ if ( tNameSize > sizeof(atPPSlist[iIndex].szName)) {
+ werr(0, "Name Size of PPS %d is too large", iIndex);
+ tNameSize = sizeof(atPPSlist[iIndex].szName);
+ }
vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize);
atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes);
if (atPPSlist[iIndex].ucType == 5) {

View File

@@ -0,0 +1,36 @@
{
lib,
fetchurl,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "antiword";
version = "0.37";
src = fetchurl {
url = "http://www.winfield.demon.nl/linux/antiword-${version}.tar.gz";
sha256 = "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f";
};
prePatch = ''
sed -i -e "s|/usr/local/bin|$out/bin|g" -e "s|/usr/share|$out/share|g" Makefile antiword.h
substituteInPlace Makefile --replace "gcc" '$(CC)'
'';
patches = [ ./10_fix_buffer_overflow_wordole_c_CVE-2014-8123.patch ];
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
];
installTargets = [ "global_install" ];
meta = {
homepage = "http://www.winfield.demon.nl/";
description = "Convert MS Word documents to plain text or PostScript";
license = lib.licenses.gpl2;
platforms = with lib.platforms; linux ++ darwin;
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "antonio";
version = "0-unstable-2013-11-21";
src = fetchFromGitHub {
owner = "vernnobile";
repo = "antonioFont";
rev = "4b3e07ab5647a613931153a09067a785f54b980a";
hash = "sha256-/mlVAEMkhmj6NUcAa9HHtpWw4lS5ze9IXw9IsrHd2J0=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp $src/{Bold,Light,Regular}/*.ttf $out/share/fonts/truetype
runHook postInstall
'';
meta = {
homepage = "https://github.com/vernnobile/antonioFont";
description = "Condensed, sans serif font for larger display, headline & banner use, based on Anton";
longDescription = ''
Antonio is a refined version of the Anton Font. Anton is a single
weight web font, designed specifically for larger display, headline and
banner use (see Googles PR for the Chromebook notebooks that used
Anton, big and bright).
Antonio extends the Anton design to include more weights and introduces
refinements to the design that makes it also suitable for use in smaller
headings, menus and buttons etc.
'';
license = lib.licenses.ofl; # in fontinfo.plist files
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ toastal ];
};
}

View File

@@ -0,0 +1,63 @@
{
antora,
buildNpmPackage,
fetchFromGitLab,
lib,
nix-update-script,
}:
buildNpmPackage rec {
pname = "antora-lunr-extension";
version = "1.0.0-alpha.8";
src = fetchFromGitLab {
owner = "antora";
repo = "antora-lunr-extension";
tag = "v${version}";
hash = "sha256-GplCwhUl8jurD4FfO6/T3Vo1WFjg+rtAjWeIh35unk4=";
};
npmDepsHash = "sha256-EtjZL6U/uSGSYSqtuatCkdWP0NHxRuht13D9OaM4x00=";
# Prevent tests from failing because they are fetching data at runtime.
postPatch = ''
substituteInPlace package.json --replace '"_mocha"' '""'
'';
# Pointing $out to $out/lib/node_modules/@antora/lunr-extension simplifies
# Antora's extension option usage from
#
# --extension ${pkgs.antora-lunr-extension}/lib/node_modules/@antora/lunr-extension
#
# to
#
# --extension ${pkgs.antora-lunr-extension}
postInstall = ''
directory="$(mktemp --directory)"
mv "$out/"{.,}* "$directory"
mv "$directory/lib/node_modules/@antora/lunr-extension/"{.,}* "$out"
'';
passthru = {
tests.run = antora.tests.run.override {
antora-lunr-extension-test = true;
};
updateScript = nix-update-script { };
};
meta = {
description = "Antora extension adding offline, full-text search powered by Lunr";
homepage = "https://gitlab.com/antora/antora-lunr-extension";
license = lib.licenses.mpl20;
longDescription = ''
This Antora extension is intended to be passed to `antora`'s `--extension`
flag or injected into the [`antora.extensions`
key](https://docs.antora.org/antora/3.1/extend/enable-extension).
'';
maintainers = [ lib.maintainers.naho ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,77 @@
{
fetchFromGitLab,
lib,
stdenvNoCC,
}:
let
srcFetchFromGitLab = {
owner = "trueNAHO";
repo = "antora-ui-default";
rev = "11f563294248e9b64124b9289d639e349f2e9f5f";
hash = "sha256-gUQLLjnWZ1OsAe005IOPIfoM0qmjoevcUuGBRD3oHXA=";
};
in
stdenvNoCC.mkDerivation {
pname = "antora-ui-default";
version = "0-unstable-2024-12-26";
# The UI bundle is fetched from lib.maintainers.naho's antora-ui-default fork
# for the following reasons:
#
# > The UI bundle is currently unpackaged [1] [2], and only accessible by
# > fetching the latest GitLab artifact or building from source. Neither
# > method is reliably reproducible, as artifacts are deleted over time and
# > building from source requires insecure Node 10.
# >
# > The solution is to version control the UI bundle.
# >
# > [...]
# >
# > [1]: https://gitlab.com/antora/antora-ui-default/-/issues/135
# > [2]: https://gitlab.com/antora/antora-ui-default/-/issues/211
# >
# > -- [3]
#
# To avoid bloating the repository archive size, the UI bundle is not stored
# in Nixpkgs.
#
# For reference, the UI bundle from [3] is 300K large.
#
# [3]: https://gitlab.com/trueNAHO/antora-ui-default/-/commit/11f563294248e9b64124b9289d639e349f2e9f5f
src = fetchFromGitLab srcFetchFromGitLab;
# Install '$src/ui-bundle.zip' to '$out/ui-bundle.zip' instead of '$out' to
# prevent the ZIP from being misidentified as a binary [1].
#
# [1]: https://github.com/NixOS/nixpkgs/blob/8885a1e21ad43f8031c738a08029cd1d4dcbc2f7/pkgs/stdenv/generic/setup.sh#L792-L795
buildCommand = ''
mkdir --parents "$out"
cp "$src/ui-bundle.zip" "$out"
'';
meta = {
description = "Antora default UI bundle";
homepage = "https://gitlab.com/antora/antora-ui-default";
license = lib.licenses.mpl20;
longDescription = ''
> A UI bundle is a [ZIP
> archive](https://en.wikipedia.org/wiki/Zip_(file_format)) or directory
> that contains one or more UIs for a site.
>
> -- Antora
> https://docs.antora.org/antora/3.1/playbook/ui-bundle-url
This UI bundle is available under `$out/ui-bundle.zip` and intended to be
passed to `antora`'s `--ui-bundle-url` flag or injected into the
[`ui.bundle.url`
key](https://docs.antora.org/antora/3.1/playbook/ui-bundle-url/#url-key)
to avoid irreproducible
[`https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable`](https://gitlab.com/${srcFetchFromGitLab.owner}/${srcFetchFromGitLab.repo}/-/blob/${srcFetchFromGitLab.rev}/README.adoc#user-content-use-the-default-ui)
references.
'';
maintainers = [ lib.maintainers.naho ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,51 @@
{
buildNpmPackage,
callPackage,
fetchFromGitLab,
lib,
nix-update-script,
}:
buildNpmPackage rec {
pname = "antora";
version = "3.1.9";
src = fetchFromGitLab {
owner = "antora";
repo = "antora";
tag = "v${version}";
hash = "sha256-hkavYC2LO8NRIRwHNWIJLRDkVnhAB4Di3IqL8uGt+U8=";
};
npmDepsHash = "sha256-ngreuitwUcIDVF6vW7fZA1OaVxr9fv7s0IjCErXlcxg=";
# This is to stop tests from being ran, as some of them fail due to trying to query remote repositories
postPatch = ''
substituteInPlace package.json --replace \
'"_mocha"' '""'
'';
postInstall = ''
mkdir -p $out/bin
ln -s $out/lib/node_modules/antora-build/packages/cli/bin/antora $out/bin/antora
'';
passthru = {
tests.run = callPackage ./test { };
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Modular documentation site generator. Designed for users of Asciidoctor";
homepage = "https://antora.org";
license = licenses.mpl20;
mainProgram = "antora";
maintainers = with maintainers; [
ehllie
naho
];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,66 @@
{
antora,
antora-lunr-extension,
antora-lunr-extension-test ? false,
antora-ui-default,
gitMinimal,
lib,
stdenvNoCC,
}:
stdenvNoCC.mkDerivation {
name = "${antora.pname}${lib.optionalString antora-lunr-extension-test "-${antora-lunr-extension.pname}"}-test";
src = ./minimal_working_example;
postPatch =
let
date = lib.escapeShellArg "1/1/1970 00:00:00 +0000";
in
''
# > In order to use a local content repository with Antora, even when using
# > the worktree (HEAD), the repository must have at least one commit.
# >
# > -- https://docs.antora.org/antora/3.1/playbook/content-source-url
git init &&
GIT_AUTHOR_DATE=${date} \
GIT_AUTHOR_EMAIL= \
GIT_AUTHOR_NAME=Nixpkgs \
GIT_COMMITTER_DATE=${date} \
GIT_COMMITTER_EMAIL= \
GIT_COMMITTER_NAME=Nixpkgs \
git commit --allow-empty --allow-empty-message --message ""
'';
buildPhase =
let
playbook = builtins.toFile "antora-playbook.json" (
builtins.toJSON {
content.sources = [ { url = "~+"; } ];
runtime.log.failure_level = "warn";
}
);
in
''
# The --to-dir and --ui-bundle-url options are not included in the
# playbook due to Antora and Nix limitations.
antora ${
lib.cli.toGNUCommandLineShell { } {
cache-dir = "$(mktemp --directory)";
extension = if antora-lunr-extension-test then antora-lunr-extension else false;
to-dir = placeholder "out";
ui-bundle-url = "${antora-ui-default}/ui-bundle.zip";
}
} "${playbook}"
'';
nativeBuildInputs = [
antora
gitMinimal
];
meta = {
description = "Reproducible Antora test framework";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.naho ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,6 @@
name: Antora
nav:
- modules/ROOT/nav.adoc
version: ~

View File

@@ -0,0 +1 @@
* xref:index.adoc[]

View File

@@ -0,0 +1,3 @@
= Antora
== Minimal Working Example

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
makeBinaryWrapper,
itk,
vtk,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ANTs";
version = "2.6.3";
src = fetchFromGitHub {
owner = "ANTsX";
repo = "ANTs";
tag = "v${finalAttrs.version}";
hash = "sha256-AaurwFIDVKhAp8+Gu3TUlGJP33ChQ6flPTYWe/cVK0w=";
};
nativeBuildInputs = [
cmake
makeBinaryWrapper
];
buildInputs = [
itk
vtk
];
cmakeFlags = [
"-DANTS_SUPERBUILD=FALSE"
"-DUSE_VTK=TRUE"
];
postInstall = ''
for file in $out/bin/*; do
wrapProgram $file --prefix PATH : "$out/bin"
done
'';
meta = {
changelog = "https://github.com/ANTsX/ANTs/releases/tag/v${finalAttrs.version}";
description = "Advanced normalization toolkit for medical image registration and other processing";
homepage = "https://github.com/ANTsX/ANTs";
license = lib.licenses.asl20;
mainProgram = "antsRegistration";
maintainers = with lib.maintainers; [ bcdarwin ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
sfml_2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "antsimulator";
version = "3.1";
src = fetchFromGitHub {
owner = "johnBuffer";
repo = "AntSimulator";
tag = "v${finalAttrs.version}";
hash = "sha256-1KWoGbdjF8VI4th/ZjAzASgsLEuS3xiwObulzxQAppA=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ sfml_2 ];
postPatch = ''
substituteInPlace src/main.cpp \
--replace-fail "res/" "$out/opt/antsimulator/"
substituteInPlace include/simulation/config.hpp \
--replace-fail "res/" "$out/opt/antsimulator/"
substituteInPlace include/render/colony_renderer.hpp \
--replace-fail "res/" "$out/opt/antsimulator/"
'';
installPhase = ''
runHook preInstall
install -Dm644 -t $out/opt/antsimulator res/*
install -Dm755 ./AntSimulator $out/bin/antsimulator
runHook postInstall
'';
meta = {
homepage = "https://github.com/johnBuffer/AntSimulator";
description = "Simple Ants simulator";
mainProgram = "antsimulator";
license = lib.licenses.mit;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchurl,
unzip,
xorg,
libGLU,
libGL,
}:
stdenv.mkDerivation rec {
pname = "AntTweakBar";
version = "1.16";
nativeBuildInputs = [ unzip ];
buildInputs = [
xorg.libX11
libGLU
libGL
];
src = fetchurl {
url = "mirror://sourceforge/project/anttweakbar/AntTweakBar_${
lib.replaceStrings [ "." ] [ "" ] version
}.zip";
sha256 = "0z3frxpzf54cjs07m6kg09p7nljhr7140f4pznwi7srwq4cvgkpv";
};
postPatch = "cd src";
installPhase = ''
mkdir -p $out/lib/
cp ../lib/{libAntTweakBar.so,libAntTweakBar.so.1,libAntTweakBar.a} $out/lib/
cp -r ../include $out/
'';
meta = {
description = "Add a light/intuitive GUI to OpenGL applications";
longDescription = ''
A small and easy-to-use C/C++ library that allows to quickly add a light
and intuitive graphical user interface into graphic applications based on OpenGL
(compatibility and core profiles), DirectX 9, DirectX 10 or DirectX 11
to interactively tweak parameters on-screen
'';
homepage = "https://anttweakbar.sourceforge.net/";
license = lib.licenses.zlib;
maintainers = [ lib.maintainers.razvan ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,98 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchNpmDeps,
nixosTests,
stdenv,
npmHooks,
nodejs,
esbuild,
brotli,
zstd,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "anubis";
version = "1.22.0";
src = fetchFromGitHub {
owner = "TecharoHQ";
repo = "anubis";
tag = "v${finalAttrs.version}";
hash = "sha256-LOYBl9r00AJljGvlacd506cLeMr8Ndh817/ZIw46Uu0=";
};
vendorHash = "sha256-/iTAbwYSHTz9SrJ0vrAXsA+3yS0jUreJDF52gju9CgU=";
npmDeps = fetchNpmDeps {
name = "anubis-npm-deps";
inherit (finalAttrs) src;
hash = "sha256-s+OxVf6Iysobfuo0nAh5qF157opD2sR5D+7awAx6GTs=";
};
nativeBuildInputs = [
esbuild
brotli
zstd
nodejs
npmHooks.npmConfigHook
];
subPackages = [ "cmd/anubis" ];
ldflags = [
"-s"
"-w"
"-X=github.com/TecharoHQ/anubis.Version=v${finalAttrs.version}"
]
++ lib.optionals stdenv.hostPlatform.isLinux [ "-extldflags=-static" ];
prePatch = ''
# we must forcefully disable the hook when creating the go vendor archive
if [[ $name =~ go-modules ]]; then
npmConfigHook() { true; }
fi
'';
postPatch = ''
patchShebangs ./web/build.sh ./lib/challenge/preact/build.sh
'';
preBuild = ''
# do not run when creating go vendor archive
if [[ ! $name =~ go-modules ]]; then
# https://github.com/TecharoHQ/anubis/blob/main/xess/build.sh
npx postcss ./xess/xess.css -o xess/xess.min.css
go generate ./...
./web/build.sh
fi
'';
preCheck = ''
export DONT_USE_NETWORK=1
'';
passthru = {
tests = { inherit (nixosTests) anubis; };
updateScript = nix-update-script { extraArgs = [ "--version-regex=^v(\\d+\\.\\d+\\.\\d+)$" ]; };
};
meta = {
description = "Weighs the soul of incoming HTTP requests using proof-of-work to stop AI crawlers";
homepage = "https://anubis.techaro.lol/";
downloadPage = "https://github.com/TecharoHQ/anubis";
changelog = "https://github.com/TecharoHQ/anubis/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
knightpp
soopyc
ryand56
sigmasquadron
defelo
];
mainProgram = "anubis";
};
})

View File

@@ -0,0 +1,43 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
nixosTests,
php,
}:
stdenvNoCC.mkDerivation {
pname = "anuko-time-tracker";
version = "1.22.19.5806";
# Project commits directly into master and has no release schedule.
# Fortunately the current version is defined in the 'APP_VERSION' constant in
# /initialize.php so we use its value and set the rev to the commit sha of when the
# constant was last updated.
src = fetchFromGitHub {
owner = "anuko";
repo = "timetracker";
rev = "43a19fcb51a21f6e3169084ac81308a6ef751e63";
hash = "sha256-ZRF9FFbntYY01JflCXkYZyXfyu/x7LNdyOB94UkVFR0=";
};
# There's nothing to build.
dontBuild = true;
installPhase = ''
mkdir $out/
cp -R ./* $out
'';
passthru.tests = {
inherit (nixosTests) anuko-time-tracker;
};
meta = {
description = "Simple, easy to use, open source time tracking system";
license = lib.licenses.sspl;
homepage = "https://github.com/anuko/timetracker/";
platforms = php.meta.platforms;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
sqlite,
xdg-utils,
}:
rustPlatform.buildRustPackage rec {
pname = "anup";
version = "0.4.0";
src = fetchFromGitHub {
owner = "Acizza";
repo = "anup";
tag = version;
hash = "sha256-4pXF4p4K8+YihVB9NdgT6bOidmQEgWXUbcbvgXJ0IDA=";
};
cargoHash = "sha256-925R5pG514JiA7iUegFkxrDpA3o7T/Ct4Igqqcdo3rw=";
buildInputs = [
sqlite
xdg-utils
];
meta = {
homepage = "https://github.com/Acizza/anup";
description = "Anime tracker for AniList featuring a TUI";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ natto1784 ];
mainProgram = "anup";
};
}

View File

@@ -0,0 +1,102 @@
{
lib,
stdenv,
buildGoModule,
fetchzip,
pkg-config,
copyDesktopItems,
makeDesktopItem,
desktopToDarwinBundle,
wayland,
libxkbcommon,
vulkan-headers,
libGL,
xorg,
buildPackages,
}:
buildGoModule (finalAttrs: {
pname = "anvil-editor";
version = "0.6";
# has to update vendorHash of extra package manually
# nixpkgs-update: no auto update
src = fetchzip {
url = "https://anvil-editor.net/releases/anvil-src-v${finalAttrs.version}.tar.gz";
hash = "sha256-i0S5V3j6OPpu4z1ljDKP3WYa9L+EKwo/MBNgW2ENYk8=";
};
modRoot = "anvil/src/anvil";
vendorHash = "sha256-1oFBV7D7JgOt5yYAxVvC4vL4ccFv3JrNngZbo+5pzrk=";
anvilExtras = buildGoModule {
pname = "anvil-editor-extras";
inherit (finalAttrs) version src meta;
vendorHash = "sha256-4pfk5XuwDbCWFZIF+1l+dy8NfnGNjgHmSg9y6/RnTSo=";
modRoot = "anvil-extras";
};
nativeBuildInputs = [
pkg-config
copyDesktopItems
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
];
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
wayland
libxkbcommon
vulkan-headers
libGL
xorg.libX11
xorg.libxcb
xorg.libXcursor
xorg.libXfixes
];
# Got different result in utf8 char length?
checkFlags = [ "-skip=^TestClearAfter$" ];
desktopItems = [
(makeDesktopItem {
name = "anvil";
exec = "anvil";
icon = "anvil";
desktopName = "Anvil";
comment = finalAttrs.meta.description;
categories = [
"Utility"
"TextEditor"
];
startupWMClass = "anvil";
})
];
postInstall = ''
pushd ../../img
# cannot add to nativeBuildInputs
# will be conflict with icnsutils in desktopToDarwinBundle
${lib.getExe' buildPackages.libicns "icns2png"} -x anvil.icns
for width in 32 48 128 256; do
square=''${width}x''${width}
install -Dm644 anvil_''${square}x32.png $out/share/icons/hicolor/''${square}/apps/anvil.png
done
popd
cp ${finalAttrs.anvilExtras}/bin/* $out/bin
'';
meta = {
description = "Graphical, multi-pane tiling editor inspired by Acme";
homepage = "https://anvil-editor.net";
license = lib.licenses.mit;
mainProgram = "anvil";
maintainers = with lib.maintainers; [ aleksana ];
platforms = with lib.platforms; unix ++ windows;
# Doesn't build with >buildGo123Module.
# Multiple errors like the following:
# '> vendor/gioui.org/internal/vk/vulkan.go:1916:9: cannot define new methods on non-local type SurfaceCapabilities'
broken = true;
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
bash,
gnused,
which,
}:
stdenv.mkDerivation rec {
pname = "any-nix-shell";
version = "2.0.1";
src = fetchFromGitHub {
owner = "haslersn";
repo = "any-nix-shell";
tag = "v${version}";
hash = "sha256-t6+LKSGWmkHQhfqw/4Ztz4QgDXQ2RZr9R/mMEEA3jlY=";
};
strictDeps = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r bin $out
wrapProgram $out/bin/any-nix-shell --prefix PATH ":" ${
lib.makeBinPath [
(placeholder "out")
gnused
which
]
}
runHook postInstall
'';
meta = {
description = "Fish, xonsh and zsh support for nix-shell";
license = lib.licenses.mit;
homepage = "https://github.com/haslersn/any-nix-shell";
maintainers = with lib.maintainers; [ haslersn ];
mainProgram = "any-nix-shell";
};
}

View File

@@ -0,0 +1,153 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
makeDesktopItem,
genericUpdater,
writeShellScript,
atk,
cairo,
gdk-pixbuf,
glib,
gtk3,
dbus,
harfbuzz,
libz,
libGLU,
libGL,
pango,
xorg,
minizip,
lsb-release,
freetype,
fontconfig,
polkit,
polkit_gnome,
pciutils,
copyDesktopItems,
pulseaudio,
}:
let
description = "Desktop sharing application, providing remote support and online meetings";
in
stdenv.mkDerivation (finalAttrs: {
pname = "anydesk";
version = "7.1.0";
src = fetchurl {
urls = [
"https://download.anydesk.com/linux/anydesk-${finalAttrs.version}-amd64.tar.gz"
"https://download.anydesk.com/linux/generic-linux/anydesk-${finalAttrs.version}-amd64.tar.gz"
];
hash = "sha256-CplmZZrlnMjmnpOvzFMiSGMnnSNXnXiUtleXi0X52lo=";
};
buildInputs = [
atk
cairo
gdk-pixbuf
glib
gtk3
dbus
harfbuzz
libz
stdenv.cc.cc
pango
libGLU
libGL
minizip
freetype
fontconfig
polkit
polkit_gnome
pulseaudio
]
++ (with xorg; [
libxcb
libxkbfile
libX11
libXdamage
libXext
libXfixes
libXi
libXmu
libXrandr
libXtst
libXt
libICE
libSM
libXrender
]);
nativeBuildInputs = [
copyDesktopItems
makeWrapper
];
desktopItems = [
(makeDesktopItem {
name = "AnyDesk";
exec = "anydesk %u";
icon = "anydesk";
desktopName = "AnyDesk";
genericName = description;
categories = [ "Network" ];
startupNotify = false;
})
];
postPatch = ''
substituteInPlace systemd/anydesk.service --replace-fail "/usr/bin/anydesk" "$out/bin/anydesk"
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/{applications,doc/anydesk,icons/hicolor} $out/lib/systemd/system
install -m755 anydesk $out/bin/anydesk
cp copyright README $out/share/doc/anydesk
cp -r icons/hicolor/* $out/share/icons/hicolor/
cp systemd/anydesk.service $out/lib/systemd/system/anydesk.service
runHook postInstall
'';
postFixup = ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "${lib.makeLibraryPath finalAttrs.buildInputs}" \
$out/bin/anydesk
wrapProgram $out/bin/anydesk \
--prefix PATH : ${
lib.makeBinPath [
lsb-release
pciutils
]
} \
--prefix GDK_BACKEND : x11 \
--set GTK_THEME Adwaita
'';
passthru = {
updateScript = genericUpdater {
versionLister = writeShellScript "anydesk-versionLister" ''
curl -s https://anydesk.com/en/downloads/linux \
| grep "https://[a-z0-9._/-]*-amd64.tar.gz" -o \
| uniq \
| sed 's,.*/anydesk-\(.*\)-amd64.tar.gz,\1,g'
'';
};
};
meta = {
inherit description;
homepage = "https://www.anydesk.com";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = [ ];
};
})

View File

@@ -0,0 +1,152 @@
{
stdenv,
lib,
fetchurl,
fetchzip,
openjdk,
openjfx,
writeScript,
runCommandLocal,
bash,
unzip,
makeWrapper,
libredirect,
xsettingsd,
makeDesktopItem,
copyDesktopItems,
python3,
}:
let
# Run update.py to update this file.
inherit (lib.importJSON ./version.json) version url sha256;
src = fetchzip {
inherit url sha256;
extension = "zip";
stripRoot = false;
};
# ÁNYK needs JavaFX for the Ügyfélkapu login webview.
jdkWithFX = openjdk.override {
enableJavaFX = true;
openjfx_jdk = openjfx.override { withWebKit = true; };
};
extraClasspath = [
# ÁNYK uses some SOAP stuff that's not shipped with OpenJDK any more.
# We don't really want to use openjdk8 because it's unusable on HiDPI
# and people are more likely to have a modern OpenJDK installed.
(fetchurl {
url = "mirror://maven/org/glassfish/metro/webservices-rt/2.4.10/webservices-rt-2.4.10.jar";
hash = "sha256-lHclIZn3HR2B2lMttmmQGIV67qJi5KhL5jT2WNUQpPI=";
})
(fetchurl {
url = "mirror://maven/org/glassfish/metro/webservices-api/2.4.10/webservices-api-2.4.10.jar";
hash = "sha256-1jiabjPkRnh+l/fmTt8aKE5hpeLreYOiLH9sVIcLUQE=";
})
(fetchurl {
url = "mirror://maven/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar";
hash = "sha256-ueJLfdbgdJVWLqllMb4xMMltuk144d/Yitu96/QzKHE=";
})
# Patch one of the ÁNYK classes so it works with the packages above by removing .internal. from the package names.
(runCommandLocal "anyk-patch" { } ''
mkdir $out
cd $out
${unzip}/bin/unzip ${src}/application/abevjava.jar hu/piller/enykp/niszws/ClientStubBuilder.class
${python3}/bin/python ${./patch_paths.py} hu/piller/enykp/niszws/ClientStubBuilder.class
'')
];
# This script can be used to run template installation jars (or use the Szervíz -> Telepítés menu)
anyk-java = writeScript "anyk-java" ''
if [ -f ~/.abevjava/abevjavapath.cfg ]
then
if ABEVJAVA_PATH_CFG=$(grep abevjava.path ~/.abevjava/abevjavapath.cfg)
then
ABEVJAVA_PATH=''${ABEVJAVA_PATH_CFG#abevjava.path = }
echo "Determined abevjava path as $ABEVJAVA_PATH"
else
echo "Could not determine abevjava path from ~/.abevjava/abevjavapath.cfg"
exit 1
fi
else
ABEVJAVA_PATH=~/abevjava
mkdir -p ~/.abevjava
echo "abevjava.path = $ABEVJAVA_PATH" > ~/.abevjava/abevjavapath.cfg
echo "Initialized abevjava path as $ABEVJAVA_PATH"
fi
# Sync help files.
mkdir -p "$ABEVJAVA_PATH/segitseg/"
cp -sRf --no-preserve=all @out@/opt/segitseg/. "$ABEVJAVA_PATH/segitseg"
export LD_PRELOAD=${libredirect}/lib/libredirect.so:$LD_PRELOAD
# Look for form templates in ABEVJAVA_PATH instead of the install dir.
export NIX_REDIRECTS=@out@/opt/nyomtatvanyok=$ABEVJAVA_PATH/nyomtatvanyok:@out@/opt/segitseg=$ABEVJAVA_PATH/segitseg:@out@/opt/setenv=$ABEVJAVA_PATH/setenv:/bin/bash=${bash}/bin/bash:$NIX_REDIRECTS
if WINDOW_SCALING_FACTOR=$(${xsettingsd}/bin/dump_xsettings | awk '/Gdk\/WindowScalingFactor/{print $NF}' | grep .); then
# Fix scaling on HiDPI.
SCALING_PROP="-Dsun.java2d.uiScale=''${WINDOW_SCALING_FACTOR}"
fi
# ÁNYK crashes with NullPointerException with the GTK look and feel so use the cross-platform one.
exec ${jdkWithFX}/bin/java -Dswing.systemlaf=javax.swing.plaf.metal.MetalLookAndFeel $SCALING_PROP "$@"
'';
in
stdenv.mkDerivation {
pname = "anyk";
inherit version src;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [
makeWrapper
copyDesktopItems
];
desktopItems = [
(makeDesktopItem {
desktopName = "ÁNYK";
name = "anyk";
exec = "anyk";
icon = "anyk";
categories = [ "Office" ];
})
];
installPhase = ''
mkdir $out
cp -r application $out/opt
mkdir $out/bin
substituteAll ${anyk-java} $out/bin/anyk-java
chmod +x $out/bin/anyk-java
# ÁNYK has some old school dependencies that are no longer bundled with Java, put them on the classpath.
makeWrapper $out/bin/anyk-java $out/bin/anyk --add-flags "-cp ${lib.concatStringsSep ":" extraClasspath}:$out/opt/abevjava.jar hu.piller.enykp.gui.framework.MainFrame"
mkdir -p $out/share/applications $out/share/pixmaps $out/share/icons
copyDesktopItems
ln -s $out/opt/abevjava.png $out/share/pixmaps/anyk.png
ln -s $out/opt/abevjava.png $out/share/icons/anyk.png
'';
meta = with lib; {
description = "Tool for filling forms for the Hungarian government";
longDescription = ''
Official tool for filling Hungarian government forms.
Use `anyk-java` to install form templates/help files like this: `anyk-java -jar NAV_IGAZOL.jar`
'';
homepage = "https://nav.gov.hu/nyomtatvanyok/letoltesek/nyomtatvanykitolto_programok/nyomtatvany_apeh/keretprogramok/javakitolto";
license = licenses.unfree;
maintainers = with maintainers; [ chpatrick ];
platforms = openjdk.meta.platforms;
sourceProvenance = [ sourceTypes.binaryBytecode ];
mainProgram = "anyk";
};
}

View File

@@ -0,0 +1,35 @@
from pathlib import Path
from struct import pack
import sys
def to_java_string(string) -> bytes:
string_bytes = string.encode("utf-8")
# Java constant pool string entries are prefixed by 0x01 and 16-bit big-endian string length.
return pack(">BH", 1, len(string_bytes)) + string_bytes
class_file = Path(sys.argv[1])
clazz = class_file.read_bytes()
# We want to fix these package names so they work with the open-source Java EE releases instead of OpenJDK 8.
patches = [
( "com/sun/xml/internal/ws/developer/WSBindingProvider", "com/sun/xml/ws/developer/WSBindingProvider" ),
( "com/sun/xml/internal/ws/api/message/Header", "com/sun/xml/ws/api/message/Header" ),
( "com.sun.xml.internal.ws.transport.http.client.streaming.chunk.size", "com.sun.xml.ws.transport.http.client.streaming.chunk.size" ),
( "com/sun/xml/internal/ws/api/message/Headers", "com/sun/xml/ws/api/message/Headers" ),
( "(Lorg/w3c/dom/Element;)Lcom/sun/xml/internal/ws/api/message/Header;", "(Lorg/w3c/dom/Element;)Lcom/sun/xml/ws/api/message/Header;" ),
( "([Lcom/sun/xml/internal/ws/api/message/Header;)V", "([Lcom/sun/xml/ws/api/message/Header;)V" ),
]
for old, new in patches:
old_java = to_java_string(old)
new_java = to_java_string(new)
assert old_java in clazz
clazz = clazz.replace(old_java, new_java)
assert old_java not in clazz
assert new_java in clazz
assert b".internal." not in clazz
class_file.write_bytes(clazz)

29
pkgs/by-name/an/anyk/update.py Executable file
View File

@@ -0,0 +1,29 @@
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p "python3.withPackages (p: [p.waybackpy])"
import subprocess
from pathlib import Path
import re
import json
import waybackpy
# NAV doesn't provide stable versioned URLs so we put the download link in Wayback Machine to preserve it.
print("Archiving...")
save_api = waybackpy.WaybackMachineSaveAPI("https://nav.gov.hu/pfile/programFile?path=/nyomtatvanyok/letoltesek/nyomtatvanykitolto_programok/nyomtatvany_apeh/keretprogramok/AbevJava")
url = save_api.save()
print("Prefetching...")
sha256, unpack_path = subprocess.check_output(["nix-prefetch-url", "--unpack", "--print-path", "--name", "abevjava", url], universal_newlines=True).split("\n")[:2]
print("Extracting version...")
manifest = (Path(unpack_path) / "META-INF" / "MANIFEST.MF").read_text()
version = re.search("Implementation-Version: (.+)", manifest).group(1)
print("Writing version.json...")
(Path(__file__).parent / "version.json").write_text(json.dumps({
"url": url,
"sha256": sha256,
"version": version,
}, indent=2) + "\n")

Some files were not shown because too many files have changed in this diff Show More