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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,162 @@
{
stdenv,
lib,
fetchFromGitHub,
gradle_9,
jdk25,
wrapGAppsHook3,
libXxf86vm,
libXtst,
libglvnd,
glib,
alsa-lib,
ffmpeg,
lsb-release,
copyDesktopItems,
makeDesktopItem,
writeScript,
}:
let
gradle = gradle_9;
in
stdenv.mkDerivation rec {
pname = "ed-odyssey-materials-helper";
version = "3.0.6";
src = fetchFromGitHub {
owner = "jixxed";
repo = "ed-odyssey-materials-helper";
tag = version;
hash = "sha256-4VxaQF1kmBo/9M0psr7jvshy1XhS02zUSMSuWvyEcoo=";
};
nativeBuildInputs = [
gradle
wrapGAppsHook3
copyDesktopItems
];
patches = [
# We'll set up the edomh: URL scheme in makeDesktopItem,
# so this removes 1) the popup about it when you first start the program, 2) the option in the settings
# and makes the program always know that it is set up
./remove-urlscheme-settings.patch
];
postPatch = ''
# oslib doesn't seem to do releases and hasn't had a change since 2021, so always use commit d6ee6549bb
# it is not the latest commit because using a commit here whose hash starts with a number causes issues, but this works
substituteInPlace build.gradle \
--replace-fail '"com.github.wille:oslib:master-SNAPSHOT"' '"com.github.wille:oslib:d6ee6549bb"'
substituteInPlace application/src/main/java/module-info.java \
--replace-fail 'requires oslib.master.SNAPSHOT;' 'requires oslib.d6ee6549bb;'
# remove "new version available" popup
substituteInPlace application/src/main/java/nl/jixxed/eliteodysseymaterials/FXApplication.java \
--replace-fail 'versionPopup();' ""
for f in build.gradle */build.gradle; do
substituteInPlace $f \
--replace-fail 'vendor = JvmVendorSpec.AZUL' ""
done
'';
mitmCache = gradle.fetchDeps {
inherit pname;
data = ./deps.json;
};
gradleFlags = [
"-Dorg.gradle.java.home=${jdk25}"
"--stacktrace"
];
gradleBuildTask = "application:jpackage";
env = {
EDDN_SOFTWARE_NAME = "EDO Materials Helper";
};
preBuild = ''
# required to make EDDN_SOFTWARE_NAME work and for the program to know its own version
gradle $gradleFlags application:generateSecrets
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{share/ed-odyssey-materials-helper,bin}
cp -r application/build/jpackage/Elite\ Dangerous\ Odyssey\ Materials\ Helper/* $out/share/ed-odyssey-materials-helper
mkdir -p $out/share/icons/hicolor/512x512/apps/
ln -s $out/share/ed-odyssey-materials-helper/lib/Elite\ Dangerous\ Odyssey\ Materials\ Helper.png $out/share/icons/hicolor/512x512/apps/ed-odyssey-materials-helper.png
runHook postInstall
'';
dontWrapGApps = true;
postFixup = ''
makeWrapper $out/share/ed-odyssey-materials-helper/bin/Elite\ Dangerous\ Odyssey\ Materials\ Helper $out/bin/ed-odyssey-materials-helper \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
libXxf86vm
glib
libXtst
libglvnd
alsa-lib
ffmpeg
]
} \
--prefix PATH : ${lib.makeBinPath [ lsb-release ]} \
"''${gappsWrapperArgs[@]}"
'';
desktopItems = [
(makeDesktopItem {
name = "ed-odyssey-materials-helper";
type = "Application";
desktopName = "Elite Dangerous Odyssey Materials Helper";
comment = "Helper for managing materials in Elite Dangerous Odyssey";
icon = "ed-odyssey-materials-helper";
exec = "ed-odyssey-materials-helper %u";
categories = [ "Game" ];
mimeTypes = [ "x-scheme-handler/edomh" ];
})
];
gradleUpdateScript = ''
runHook preBuild
gradle application:nixDownloadDeps -Dos.family=linux -Dos.arch=amd64
gradle application:nixDownloadDeps -Dos.family=linux -Dos.arch=aarch64
'';
passthru.updateScript = writeScript "update-ed-odyssey-materials-helper" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update
nix-update ed-odyssey-materials-helper # update version and hash
`nix-build --no-out-link -A ed-odyssey-materials-helper.mitmCache.updateScript` # update deps.json
'';
meta = {
description = "Helper for managing materials in Elite Dangerous Odyssey";
homepage = "https://github.com/jixxed/ed-odyssey-materials-helper";
downloadPage = "https://github.com/jixxed/ed-odyssey-materials-helper/releases/tag/${version}";
changelog = "https://github.com/jixxed/ed-odyssey-materials-helper/releases/tag/${version}";
license = lib.licenses.gpl3Only;
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode # mitm cache
];
maintainers = with lib.maintainers; [
elfenermarcell
toasteruwu
];
mainProgram = "ed-odyssey-materials-helper";
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
}

View File

@@ -0,0 +1,43 @@
diff --git a/application/src/main/java/nl/jixxed/eliteodysseymaterials/FXApplication.java b/application/src/main/java/nl/jixxed/eliteodysseymaterials/FXApplication.java
index 0a3b0dc6..d4bd57d9 100644
--- a/application/src/main/java/nl/jixxed/eliteodysseymaterials/FXApplication.java
+++ b/application/src/main/java/nl/jixxed/eliteodysseymaterials/FXApplication.java
@@ -125,7 +125,6 @@ public class FXApplication extends Application {
}
PreferencesService.setPreference(PreferenceConstants.APP_SETTINGS_VERSION, System.getProperty("app.version"));
whatsnewPopup();
- urlSchemePopup();
eddnPopup();
versionPopup();
MaterialTrackingService.initialize();
diff --git a/application/src/main/java/nl/jixxed/eliteodysseymaterials/service/registry/UbuntuRegistrationHandler.java b/application/src/main/java/nl/jixxed/eliteodysseymaterials/service/registry/UbuntuRegistrationHandler.java
index 6ac788ea..a5281983 100644
--- a/application/src/main/java/nl/jixxed/eliteodysseymaterials/service/registry/UbuntuRegistrationHandler.java
+++ b/application/src/main/java/nl/jixxed/eliteodysseymaterials/service/registry/UbuntuRegistrationHandler.java
@@ -62,11 +62,7 @@ public class UbuntuRegistrationHandler implements RegistrationHandler {
@Override
public boolean isRegistered() {
- if (!VersionService.isDev()) {
- final File file = new File(System.getProperty(USER_HOME) + DESKTOP_FILE_PATH);
- return file.exists() && file.isFile();
- }
- return false;
+ return true;
}
diff --git a/application/src/main/java/nl/jixxed/eliteodysseymaterials/templates/settings/sections/General.java b/application/src/main/java/nl/jixxed/eliteodysseymaterials/templates/settings/sections/General.java
index 5fa546bb..839eed44 100644
--- a/application/src/main/java/nl/jixxed/eliteodysseymaterials/templates/settings/sections/General.java
+++ b/application/src/main/java/nl/jixxed/eliteodysseymaterials/templates/settings/sections/General.java
@@ -82,8 +82,7 @@ public class General extends DestroyableVBox implements DestroyableEventTemplate
langSetting,
fontSetting,
customJournalFolderSetting,
- pollSetting,
- urlSchemeLinkingSetting
+ pollSetting
);
if (OsCheck.isWindows()) {
final DestroyableHBox darkModeSetting = createDarkModeSetting();

View File

@@ -0,0 +1,60 @@
{
lib,
fetchurl,
lzip,
runtimeShellPackage,
stdenv,
testers,
}:
# Note: this package is used for bootstrapping fetchurl, and thus cannot use
# fetchpatch! Any mutable patches (retrieved from GitHub, cgit or any other
# place) that are needed here should be directly included together as regular
# files.
stdenv.mkDerivation (finalAttrs: {
pname = "ed";
version = "1.22.2";
src = fetchurl {
url = "mirror://gnu/ed/ed-${finalAttrs.version}.tar.lz";
hash = "sha256-9Y0VJCBW4Vr3bxPzTGDYkPoqLVywq++RwRXk2DeU/+M=";
};
nativeBuildInputs = [ lzip ];
buildInputs = [ runtimeShellPackage ];
configureFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
];
strictDeps = true;
doCheck = true;
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "ed --version";
};
};
meta = {
homepage = "https://www.gnu.org/software/ed/";
description = "GNU implementation of the standard Unix editor";
longDescription = ''
GNU ed is a line-oriented text editor. It is used to create, display,
modify and otherwise manipulate text files, both interactively and via
shell scripts. A restricted version of ed, red, can only edit files in the
current directory and cannot execute shell commands. Ed is the 'standard'
text editor in the sense that it is the original editor for Unix, and thus
widely available. For most purposes, however, it is superseded by
full-screen editors such as GNU Emacs or GNU Moe.
'';
license = lib.licenses.gpl3Plus;
mainProgram = "ed";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
perl,
sysfsutils,
dmidecode,
kmod,
}:
stdenv.mkDerivation {
pname = "edac-utils";
version = "unstable-2023-01-30";
src = fetchFromGitHub {
owner = "grondo";
repo = "edac-utils";
rev = "8fdc1d40e30f65737fef6c3ddcd1d2cd769f6277";
hash = "sha256-jZGRrZ1sa4x0/TBJ5GsNVuWakmPNOU+oiOoXdhARunk=";
};
# Hard-code program paths instead of using PATH lookups. Also, labels.d and
# mainboard are for user-configurable data, so do not look for them in Nix
# store.
dmidecodeProgram = lib.getExe' dmidecode "dmidecode";
modprobeProgram = lib.getExe' kmod "modprobe";
postPatch = ''
substituteInPlace src/util/edac-ctl.in \
--replace-fail 'find_prog ("dmidecode")' "\"$dmidecodeProgram\"" \
--replace-fail 'find_prog ("modprobe") or exit (1)' "\"$modprobeProgram\"" \
--replace-fail '"$sysconfdir/edac/labels.d"' '"/etc/edac/labels.d"' \
--replace-fail '"$sysconfdir/edac/mainboard"' '"/etc/edac/mainboard"'
'';
# NB edac-utils needs Perl for configure script, but also edac-ctl program is
# a Perl script. Perl from buildInputs is used by patchShebangsAuto in
# fixupPhase to update the hash bang line.
strictDeps = true;
nativeBuildInputs = [ perl ];
buildInputs = [
perl
sysfsutils
];
installFlags = [
"sbindir=${placeholder "out"}/bin"
];
# SysV init script is not relevant.
postInstall = ''
rm -r "$out"/etc/init.d
'';
meta = with lib; {
homepage = "https://github.com/grondo/edac-utils";
description = "Handles the reporting of hardware-related memory errors";
mainProgram = "edac-util";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

7
pkgs/by-name/ed/eddie/deps.json generated Normal file
View File

@@ -0,0 +1,7 @@
[
{
"pname": "Microsoft.CSharp",
"version": "4.7.0",
"hash": "sha256-Enknv2RsFF68lEPdrf5M+BpV1kHoLTVRApKUwuk/pj0="
}
]

View File

@@ -0,0 +1,24 @@
From 7e7d03d09990cf8e17091572258f12b77a661d74 Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <contact@paveloom.dev>
Date: Fri, 6 Dec 2024 22:42:40 +0300
Subject: [PATCH 2/2] Don't set `RPATH` in `eddie-tray`.
---
src/App.Forms.Linux.Tray/build.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/App.Forms.Linux.Tray/build.sh b/src/App.Forms.Linux.Tray/build.sh
index 771b2c7..bc1093c 100755
--- a/src/App.Forms.Linux.Tray/build.sh
+++ b/src/App.Forms.Linux.Tray/build.sh
@@ -35,7 +35,6 @@ g++ "$BASEPATH/main.cpp" -fPIC -o "$BASEPATH/bin/eddie-tray" `pkg-config --cflag
strip -S --strip-unneeded "$BASEPATH/bin/eddie-tray"
chmod a+x "$BASEPATH/bin/eddie-tray"
-patchelf --set-rpath '$ORIGIN' "$BASEPATH/bin/eddie-tray"
echo "Building eddie-tray - Done"
exit 0
--
2.47.0

View File

@@ -0,0 +1,153 @@
{
lib,
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
gcc,
makeWrapper,
msbuild,
pkg-config,
curl,
gtk3,
libayatana-appindicator,
openssh,
openvpn,
stunnel,
gtk2,
libayatana-indicator,
mono,
versionCheckHook,
eddie,
testers,
}:
buildDotnetModule (finalAttrs: {
pname = "eddie";
version = "2.24.6";
src = fetchFromGitHub {
owner = "AirVPN";
repo = "Eddie";
tag = finalAttrs.version;
hash = "sha256-XSLxjF2k9cw+cx6KzFIQHtjDWqLT2V49KRw+oIyxM5M=";
};
patches = [
./dont-set-rpath-in-eddie-tray.patch
./remove-the-postbuild-from-the-project-file.patch
];
projectFile = [ "src/App.CLI.Linux/App.CLI.Linux.net8.csproj" ];
nugetDeps = ./deps.json;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
nativeBuildInputs = [
gcc
makeWrapper
msbuild
pkg-config
];
buildInputs = [
curl
gtk3
libayatana-appindicator
];
nativeRuntimeInputs = lib.makeBinPath [
openssh
openvpn
stunnel
];
runtimeInputs = lib.makeLibraryPath [
gtk2
gtk3
libayatana-indicator
];
makeWrapperArgs = [
"--add-flags \"--path.resources=${placeholder "out"}/share/eddie-ui\""
"--prefix PATH : ${finalAttrs.nativeRuntimeInputs}"
];
executables = [ "eddie-cli" ];
postPatch = ''
patchShebangs src
'';
postBuild = ''
src/App.CLI.Linux.Elevated/build.sh Release
src/Lib.Platform.Linux.Native/build.sh Release
src/App.Forms.Linux.Tray/build.sh Release
msbuild \
-v:minimal \
-p:Configuration=Release \
-p:TargetFrameworkVersion=v4.8 \
-p:DefineConstants="EDDIEMONO4LINUX" \
src/App.Forms.Linux/App.Forms.Linux.sln
'';
postInstall = ''
mkdir -p $out/lib/eddie-ui
mkdir -p $out/share/{applications,eddie-ui}
cp src/App.CLI.Linux.Elevated/bin/eddie-cli-elevated $out/lib/eddie-ui
cp src/Lib.Platform.Linux.Native/bin/libLib.Platform.Linux.Native.so $out/lib/eddie-ui
cp src/App.Forms.Linux.Tray/bin/eddie-tray $out/lib/eddie-ui
ln -s $out/lib/eddie-ui/eddie-cli-elevated $out/lib/eddie/eddie-cli-elevated
ln -s $out/lib/eddie-ui/libLib.Platform.Linux.Native.so $out/lib/eddie/Lib.Platform.Linux.Native.so
cp -r src/App.Forms.Linux/bin/*/Release/* $out/lib/eddie-ui
chmod +x $out/lib/eddie-ui/App.Forms.Linux.exe
cp -r resources/* $out/share/eddie-ui
cp -r repository/linux_arch/bundle/eddie-ui/usr/share/{applications,pixmaps,polkit-1} $out/share
substituteInPlace \
$out/share/{applications/eddie-ui.desktop,polkit-1/actions/org.airvpn.eddie.ui.elevated.policy} \
--replace-fail /usr $out
makeWrapper "${mono}/bin/mono" $out/bin/eddie-ui \
--add-flags $out/lib/eddie-ui/App.Forms.Linux.exe \
--prefix LD_LIBRARY_PATH : ${finalAttrs.runtimeInputs} \
''${makeWrapperArgs[@]}
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/eddie-cli";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
tests.version = testers.testVersion {
package = eddie;
command = "eddie-cli version.short";
};
};
meta = {
description = "AirVPN's OpenVPN and WireGuard wrapper";
homepage = "https://eddie.website";
license = lib.licenses.gpl3Plus;
mainProgram = "eddie-ui";
maintainers = with lib.maintainers; [
ryand56
];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,27 @@
From bfe8a4e0d75b97cf646818bfba52dfdbc3c4274c Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <contact@paveloom.dev>
Date: Fri, 6 Dec 2024 22:42:40 +0300
Subject: [PATCH 1/2] Remove the postbuild from the project file.
---
src/App.CLI.Linux/App.CLI.Linux.net8.csproj | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/App.CLI.Linux/App.CLI.Linux.net8.csproj b/src/App.CLI.Linux/App.CLI.Linux.net8.csproj
index 8d53d36..b4b3822 100644
--- a/src/App.CLI.Linux/App.CLI.Linux.net8.csproj
+++ b/src/App.CLI.Linux/App.CLI.Linux.net8.csproj
@@ -50,9 +50,4 @@
<ProjectReference Include="..\Lib.Core\Lib.Core.net8.csproj" />
<ProjectReference Include="..\Lib.Platform.Linux\Lib.Platform.Linux.net8.csproj" />
</ItemGroup>
-
- <Target Name="LinuxPostBuild" AfterTargets="PostBuildEvent">
- <Exec Command="$(ProjectDir)/postbuild.sh &quot;$(TargetDir)&quot; $(RuntimeIdentifier) $(ConfigurationName)" />
- </Target>
-
</Project>
\ No newline at end of file
--
2.47.0

View File

@@ -0,0 +1,49 @@
{
python3Packages,
fetchFromGitHub,
lib,
jre,
qt5,
}:
python3Packages.buildPythonApplication rec {
pname = "eddy";
version = "3.7.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "obdasystems";
repo = "eddy";
tag = "v${version}";
sha256 = "sha256-K8yd7A4D1LAgwuaJvxdF0oqACuMxX/CZ6yKbR7D+uEQ=";
};
propagatedBuildInputs = [
qt5.qtbase
qt5.wrapQtAppsHook
python3Packages.setuptools
python3Packages.rfc3987
python3Packages.jpype1
python3Packages.pyqt5
];
# Tests fail with: ImportError: cannot import name 'QtXmlPatterns' from 'PyQt5'
doCheck = false;
preBuild = ''
export HOME=/tmp
'';
preFixup = ''
wrapQtApp "$out/bin/eddy" --prefix JAVA_HOME : ${jre}
'';
meta = with lib; {
homepage = "http://www.obdasystems.com/eddy";
description = "Graphical editor for the specification and visualization of Graphol ontologies";
mainProgram = "eddy";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ koslambrou ];
};
}

View File

@@ -0,0 +1,27 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d7b3454df..2ce7b5af1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,8 +50,7 @@
"${CMAKE_CURRENT_SOURCE_DIR}/build/fbcode_builder/CMake"
${CMAKE_MODULE_PATH})
-find_package(Glog MODULE REQUIRED)
-include_directories(${GLOG_INCLUDE_DIR})
+find_package(Glog CONFIG REQUIRED)
find_package(Gflags REQUIRED)
include_directories(${GFLAGS_INCLUDE_DIR})
diff --git a/eden/common/testharness/CMakeLists.txt b/eden/common/testharness/CMakeLists.txt
index bef7421906..f35067efa9 100644
--- a/eden/common/testharness/CMakeLists.txt
+++ b/eden/common/testharness/CMakeLists.txt
@@ -19,7 +19,7 @@
${BOOST_LIBRARIES}
Folly::folly_test_util
${LIBGMOCK_LIBRARIES}
- ${GLOG_LIBRARY}
+ glog::glog
)
target_include_directories(

View File

@@ -0,0 +1,20 @@
diff --git a/eden/common/os/test/CMakeLists.txt b/eden/common/os/test/CMakeLists.txt
index a9f71443f8..be1423c455 100644
--- a/eden/common/os/test/CMakeLists.txt
+++ b/eden/common/os/test/CMakeLists.txt
@@ -18,4 +18,4 @@
${LIBGMOCK_LIBRARIES}
)
-gtest_discover_tests(os_test)
+gtest_discover_tests(os_test DISCOVERY_TIMEOUT 25)
diff --git a/eden/common/utils/test/CMakeLists.txt b/eden/common/utils/test/CMakeLists.txt
index 0cac73e569..ff08ecccb8 100644
--- a/eden/common/utils/test/CMakeLists.txt
+++ b/eden/common/utils/test/CMakeLists.txt
@@ -34,4 +34,4 @@
${LIBGMOCK_LIBRARIES}
)
-gtest_discover_tests(utils_test)
+gtest_discover_tests(utils_test DISCOVERY_TIMEOUT 25)

View File

@@ -0,0 +1,111 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
glog,
gflags,
folly,
fb303,
wangle,
fbthrift,
gtest,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "edencommon";
version = "2025.09.15.00";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "facebookexperimental";
repo = "edencommon";
tag = "v${finalAttrs.version}";
hash = "sha256-KyJAosCLGnpEG968GV9BOyOrsoHS7BbRatTfBqzTelU=";
};
patches = [
./glog-0.7.patch
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
# Test discovery timeout is bizarrely flaky on `x86_64-darwin`
./increase-test-discovery-timeout.patch
];
nativeBuildInputs = [
cmake
ninja
];
buildInputs = [
glog
gflags
folly
fb303
wangle
fbthrift
gtest
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "CMAKE_INSTALL_RPATH_USE_LINK_PATH" true)
(lib.cmakeFeature "INCLUDE_INSTALL_DIR" "${placeholder "dev"}/include")
(lib.cmakeFeature "LIB_INSTALL_DIR" "${placeholder "out"}/lib")
(lib.cmakeFeature "CMAKE_INSTALL_DIR" "${placeholder "dev"}/lib/cmake/edencommon")
];
doCheck = true;
checkPhase = ''
runHook preCheck
# Skip flaky test
ctest -j $NIX_BUILD_CORES --output-on-failure ${
lib.escapeShellArgs [
"--exclude-regex"
(lib.concatMapStringsSep "|" (test: "^${lib.escapeRegex test}$") [
"ProcessInfoCache.addFromMultipleThreads"
])
]
}
runHook postCheck
'';
postPatch = ''
# The CMake build requires the FBThrift Python support even though
# its not used, presumably because of the relevant code having
# been moved in from another repository.
substituteInPlace CMakeLists.txt \
--replace-fail \
'find_package(FBThrift CONFIG REQUIRED COMPONENTS cpp2 py)' \
'find_package(FBThrift CONFIG REQUIRED COMPONENTS cpp2)'
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Shared library for Meta's source control filesystem tools (EdenFS and Watchman)";
homepage = "https://github.com/facebookexperimental/edencommon";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
kylesferrazza
emily
techknowlogick
];
};
})

View File

@@ -0,0 +1,61 @@
{
autoPatchelfHook,
dpkg,
fetchurl,
lib,
libcxx,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "edgetpu-compiler";
version = "15.0";
src = fetchurl rec {
url = "https://packages.cloud.google.com/apt/pool/${pname}_${version}_amd64_${sha256}.deb";
sha256 = "ce03822053c2bddbb8640eaa988396ae66f9bc6b9d6d671914acd1727c2b445a";
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
];
buildInputs = [
libcxx
];
unpackPhase = ''
mkdir bin pkg
dpkg -x $src pkg
rm -r pkg/usr/share/lintian
cp pkg/usr/bin/edgetpu_compiler_bin/edgetpu_compiler ./bin
cp -r pkg/usr/share .
rm -r pkg
'';
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r ./{bin,share} $out
runHook postInstall
'';
meta = with lib; {
description = "Command line tool that compiles a TensorFlow Lite model into an Edge TPU compatible file";
mainProgram = "edgetpu_compiler";
homepage = "https://coral.ai/docs/edgetpu/compiler";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.asl20;
maintainers = with maintainers; [ cpcloud ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,38 @@
diff --git a/radio/util/find_clang.py b/radio/util/find_clang.py
index d9cdbb083..f78f87717 100644
--- a/radio/util/find_clang.py
+++ b/radio/util/find_clang.py
@@ -59,6 +59,7 @@ def getBuiltinHeaderPath(library_path):
return None
def findLibClang():
+ return "@libclang@"
if sys.platform == "darwin":
knownPaths = [
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib",
diff --git a/radio/util/generate_datacopy.py b/radio/util/generate_datacopy.py
index a92b0c3e2..6385b2ff6 100755
--- a/radio/util/generate_datacopy.py
+++ b/radio/util/generate_datacopy.py
@@ -5,7 +5,8 @@ import sys
import clang.cindex
import time
import os
-
+from pathlib import Path
+import re
structs = []
extrastructs = []
@@ -102,6 +103,11 @@ def main():
if find_clang.builtin_hdr_path:
args.append("-I" + find_clang.builtin_hdr_path)
+ args.append("-resource-dir")
+ args.append("@resourceDir@")
+ for path in ["@libc-cflags@", "@libcxx-cflags@"]:
+ args.extend([flag.strip() for flag in re.split(r'\s+', Path(path).read_text()) if flag.strip()])
+
translation_unit = index.parse(sys.argv[1], args)
if translation_unit.diagnostics:

View File

@@ -0,0 +1,184 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
cmake,
ninja,
libsForQt5,
SDL2,
fox_1_6,
replaceVars,
llvmPackages,
dfu-util,
gtest,
miniz,
yaml-cpp,
udevCheckHook,
# List of targets to build simulators for
targetsToBuild ? import ./targets.nix,
}:
let
# Keep in sync with `cmake/FetchMaxLibQt.cmake`.
maxlibqt = fetchFromGitHub {
owner = "edgetx";
repo = "maxLibQt";
rev = "ac1988ffd005cd15a8449b92150ce6c08574a4f1";
hash = "sha256-u8e4qseU0+BJyZkV0JE4sUiXaFeIYvadkMTGXXiE2Kg=";
};
pythonEnv = python3.withPackages (
pyPkgs: with pyPkgs; [
pillow
lz4
jinja2
libclang
]
);
in
stdenv.mkDerivation (finalAttrs: {
pname = "edgetx";
version = "2.11.2";
src = fetchFromGitHub {
owner = "EdgeTX";
repo = "edgetx";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-F3T1lX0FSSUIQxSlqLQHj7JrfF+20Ndv63zDA0sRzFQ=";
};
nativeBuildInputs = [
cmake
ninja
pythonEnv
libsForQt5.qttools
libsForQt5.wrapQtAppsHook
udevCheckHook
];
buildInputs = [
libsForQt5.qtbase
libsForQt5.qtmultimedia
libsForQt5.qtserialport
SDL2
fox_1_6
];
patches = [
(replaceVars ./0001-libclang-paths.patch (
let
llvmMajor = lib.versions.major llvmPackages.llvm.version;
in
{
resourceDir = "${llvmPackages.clang.cc.lib}/lib/clang/${llvmMajor}";
libclang = "${lib.getLib llvmPackages.libclang}/lib/libclang.so";
libc-cflags = "${llvmPackages.clang}/nix-support/libc-cflags";
libcxx-cflags = "${llvmPackages.clang}/nix-support/libcxx-cxxflags";
}
))
];
postPatch = ''
sed -i companion/src/burnconfigdialog.cpp \
-e 's|/usr/.*bin/dfu-util|${dfu-util}/bin/dfu-util|'
patchShebangs companion/util radio/util
'';
doInstallCheck = true;
cmakeFlags = [
# Unvendoring these libraries is infeasible. At least lets reuse the same sources.
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_GOOGLETEST" "${gtest.src}")
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_MINIZ" "${miniz.src}")
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_YAML-CPP" "${yaml-cpp.src}")
# Custom library https://github.com/edgetx/maxLibQt.
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_MAXLIBQT" "${maxlibqt}")
(lib.cmakeFeature "DFU_UTIL_ROOT_DIR" "${lib.getBin dfu-util}/bin")
# Superbuild machinery is only getting in the way.
(lib.cmakeBool "EdgeTX_SUPERBUILD" false)
# COMMON_OPTIONS from tools/build-companion.sh.
(lib.cmakeBool "GVARS" true)
(lib.cmakeBool "HELI" true)
(lib.cmakeBool "LUA" true)
# Build companion and not the firmware.
(lib.cmakeBool "NATIVE_BUILD" true)
# file RPATH_CHANGE could not write new RPATH.
(lib.cmakeBool "CMAKE_SKIP_BUILD_RPATH" true)
];
env = {
EDGETX_VERSION_SUFFIX = "nixpkgs";
};
dontUseCmakeConfigure = true;
inherit targetsToBuild;
__structuredAttrs = true; # To pass targetsToBuild as an array.
configurePhase = ''
runHook preConfigure
prependToVar cmakeFlags "-GNinja"
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
cmakeCommonFlags="$''\{cmakeFlags[@]}"
# This is the most sensible way to convert target name -> cmake options
# aside from manually extracting bash variables from upstream's CI scripts
# and converting that to nix expressions. Let's hope upstream doesn't break
# this file too often.
source $src/tools/build-common.sh
# Yes, this is really how upstream expects packaging to look like ¯\_()_/¯.
# https://github.com/EdgeTX/edgetx/wiki/Build-Instructions-under-Ubuntu-20.04#building-companion-simulator-and-radio-simulator-libraries
for plugin in "$''\{targetsToBuild[@]''\}"
do
# Variable modified by `get_target_build_options` from build-common.sh.
local BUILD_OPTIONS=""
get_target_build_options "$plugin"
# With each invocation of `cmakeConfigurePhase` `cmakeFlags` gets
# prepended to, so it has to be reset.
cmakeFlags=()
appendToVar cmakeFlags $cmakeCommonFlags $BUILD_OPTIONS
pushd .
cmakeConfigurePhase
ninjaFlags=("libsimulator")
ninjaBuildPhase
rm CMakeCache.txt
popd
done
cmakeConfigurePhase
ninjaFlags=()
ninjaBuildPhase
runHook postBuild
'';
meta = {
description = "EdgeTX Companion transmitter support software";
longDescription = ''
EdgeTX Companion is used for many different tasks like loading EdgeTX
firmware to the radio, backing up model settings, editing settings and
running radio simulators.
'';
mainProgram = "companion" + lib.concatStrings (lib.take 2 (lib.splitVersion finalAttrs.version));
homepage = "https://edgetx.org/";
license = lib.licenses.gpl2Only;
platforms = [
"i686-linux"
"x86_64-linux"
"aarch64-linux"
];
maintainers = with lib.maintainers; [
elitak
lopsided98
wucke13
xokdvium
];
};
})

View File

@@ -0,0 +1,48 @@
# Keep in sync with tools/build-companion.sh
[
"x9lite"
"x9lites"
"x7"
"x7access"
"t8"
"t12"
"t12max"
"tx12"
"tx12mk2"
"zorro"
"commando8"
"boxer"
"pocket"
"mt12"
"gx12"
"tlite"
"tpro"
"tprov2"
"tpros"
"bumblebee"
"lr3pro"
"t14"
"x9d"
"x9dp"
"x9dp2019"
"x9e"
"xlite"
"xlites"
"nv14"
"el18"
"pl18"
"pl18ev"
"pl18u"
"st16"
"x10"
"x10express"
"x12s"
"t15"
"t16"
"t18"
"t20"
"t20v2"
"tx16s"
"f16"
"v16"
]

View File

@@ -0,0 +1,92 @@
{
lib,
stdenv,
fetchFromGitHub,
dos2unix,
hexdump,
v4l-utils,
zsh,
}:
# Usage:
# hardware.firmware = [(edid-generator.overrideAttrs {
# clean = true;
# modelines = ''
# Modeline "PG278Q_60" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 -hsync +vsync
# Modeline "PG278Q_120" 497.75 2560 2608 2640 2720 1440 1443 1448 1525 +hsync -vsync
# Modeline "U2711_60" 241.50 2560 2600 2632 2720 1440 1443 1448 1481 -hsync +vsync
# '';
# })];
stdenv.mkDerivation {
pname = "edid-generator";
version = "master-2023-11-20";
# so `hardware.firmware` doesn't compress it
compressFirmware = false;
src = fetchFromGitHub {
owner = "akatrevorjay";
repo = "edid-generator";
rev = "476a016d8b488df749bf6d6efbf7b9fbfb2e3cb8";
sha256 = "sha256-UGxze273VB5cQDWrv9X/Lam6WbOu9U3bro8GcVbEvws=";
};
nativeBuildInputs = [
dos2unix
hexdump
v4l-utils
zsh
];
postPatch = ''
patchShebangs modeline2edid
'';
passAsFile = [ "modelines" ];
clean = false;
modelines = "";
configurePhase = ''
runHook preConfigure
test "$clean" != 1 || rm *x*.S
./modeline2edid - <"$modelinesPath"
for file in *.S ; do
echo "--- generated file: $file"
cat "$file"
done
make clean
runHook postConfigure
'';
buildPhase = ''
make all
'';
doCheck = true;
checkPhase = ''
for file in *.bin ; do
echo "validating $file"
edid-decode <"$file"
done
'';
installPhase = ''
install -Dm 444 *.bin -t "$out/lib/firmware/edid"
'';
meta = {
description = "Hackerswork to generate an EDID blob from given Xorg Modelines";
homepage = "https://github.com/akatrevorjay/edid-generator";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [
flokli
nazarewk
];
platforms = lib.platforms.all;
broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/edid-generator.x86_64-darwin
};
}

176
pkgs/by-name/ed/edido/edido.sh Executable file
View File

@@ -0,0 +1,176 @@
#!/usr/bin/env bash
set -eEuo pipefail
test -z "${DEBUG:-}" || set -x
set -eEuo pipefail
FIRMWARE_PATH="${EDID_PATH:-"/run/current-system/firmware"}"
mapfile -t edid_paths <<<"${FIRMWARE_PATH//":"/$'\n'}"
err() {
LOGGER="ERROR" log "$@"
return 1
}
log() {
# shellcheck disable=SC2059
printf "[${LOGGER:-"INFO"}] $1\n" "${@:2}" >&2
}
find_path() {
local filePath="$1"
mapfile -t candidates < <(
set -x
find -L "${@:2}" -path "*/${filePath}"
)
if test "${#candidates[@]}" -eq 0; then
log "'%s' path not found" "${filePath}"
return 1
fi
log "'%s' path found at %s" "${filePath}" "${candidates[0]}"
echo -n "${candidates[0]}"
}
wait_for_file() {
local filePath="$1"
until find_path "${filePath}" "${@:2}"; do
backoff "${filePath}"
done
}
backoff() {
local what="$1" sleepFor
backoff_start="${backoff_start:-"5"}"
backoff_current="${backoff_current:-"${backoff_start}"}"
backoff_jitter_multiplier="${backoff_jitter_multiplier:-"0.3"}"
backoff_multiplier="${backoff_multiplier:-1.5}"
sleepFor="$(bc <<<"${backoff_current} + ${RANDOM} % (${backoff_current} * ${backoff_jitter_multiplier})")"
log "still waiting for '%s', retry in %s sec..." "${what}" "${sleepFor}"
sleep "${sleepFor}"
backoff_current="$(bc <<<"scale=2; ${backoff_current} * ${backoff_multiplier}")"
}
force_mode() {
local connPath="$1" newMode="$2" currentMode
currentMode="$(cat "$connPath/force")"
if test "${currentMode}" == "${newMode}"; then
log "video mode is already '%s'" "${currentMode}"
return
fi
log "changing video mode from '%s' to '%s'" "${currentMode}" "${newMode}"
echo "${newMode}" >"$connPath/force"
CHANGED=1
}
force_edid() {
local connPath="$1" edidPath="$2"
}
apply_mode() {
local connPath="$1" mode="$2"
test -n "$mode" || return
log "setting up fb mode..."
# see https://github.com/torvalds/linux/blob/8cd26fd90c1ad7acdcfb9f69ca99d13aa7b24561/drivers/gpu/drm/drm_sysfs.c#L202-L207
# see https://docs.kernel.org/fb/modedb.html
case "${mode}" in
*d) force_mode "$connPath" off ;;
*e) force_mode "$connPath" on ;;
*D) force_mode "$connPath" on-digital ;;
esac
}
apply_edid() {
local connPath="$1" edidFilename="$2" edidPath
test -n "${edidFilename}" || return
log "loading EDID override..."
edidPath="$(find_path "${edidFilename}" "${edid_paths[@]/%/"/"}" -maxdepth 2)"
force_edid "${connPath}" "$edidPath"
cat "$edidPath" >"${connPath}/edid_override"
if cmp "${connPath}/edid_override" "${edidPath}" &>/dev/null; then
log "EDID is already up to date with '%s'" "${edidPath}"
else
log "applying EDID override from ${edidPath}"
cat "$edidPath" >"${connPath}/edid_override"
CHANGED=1
fi
}
load() {
local conn="$1" edidFilename="$2" mode="$3"
export LOGGER="$conn:${edidFilename}:$mode"
CHANGED="${CHANGED:-0}"
log "starting configuration"
local connPath
connPath="$(wait_for_file "$conn" /sys/kernel/debug/dri/ -maxdepth 2 -type d)"
apply_edid "${connPath}" "${edidFilename}"
apply_mode "${connPath}" "$mode"
if test "${CHANGED}" != 0; then
log "changes detected, triggering hotplug"
echo 1 >"${connPath}/trigger_hotplug"
else
log "no changes detected, skipping hotplug trigger"
fi
}
main() {
if [[ $EUID -ne 0 ]]; then
err "must be run as root"
fi
if test "$#" == 0; then
log "loading kernel parameters from /proc/cmdline"
# replace script arguments with kernel parameters
mapfile -t args < <(xargs -n1 </proc/cmdline)
else
log "loading kernel parameters compatible arguments from commandline"
args=("$@")
fi
local -A edids modes connectors
local -a entries
local key value
for arg in "${args[@]}"; do
key="${arg%%=*}"
value=""
test "${key}" == "${arg}" || value="${arg#*=}"
case "${key}" in
video)
# one argument per connector:
# video=DP-4:e video=DP-1:e
connector="${value%:*}"
mode="${value#*:}"
connectors["${connector}"]=""
modes["$connector"]="$mode"
;;
drm.edid_firmware)
# single argument for all connectors:
# drm.edid_firmware=DP-4:edid/one.bin,DP-1:edid/two.bin
mapfile -t entries <<<"${value//","/$'\n'}"
for entry in "${entries[@]}"; do
connector="${entry%:*}"
edidFilename="${entry#*:}"
connectors["${connector}"]=""
edids["${connector}"]="${edidFilename}"
done
;;
esac
done
for connector in "${!connectors[@]}"; do
# spawn in a subshell to easily adjust and runtime modify global variables
(load "${connector}" "${edids["${connector}"]:-""}" "${modes["${connector}"]:-""}") &
done
wait
}
main "$@"

View File

@@ -0,0 +1,24 @@
{
writeShellApplication,
bc,
diffutils,
findutils,
coreutils,
firmwarePaths ? [
"/run/current-system/firmware"
],
}:
writeShellApplication {
name = "edido";
meta.description = "Tool to apply display configuration from `boot.kernelParams`";
runtimeInputs = [
diffutils
findutils
coreutils
bc
];
text = ''
FIRMWARE_PATH="''${FIRMWARE_PATH:-"${builtins.concatStringsSep ":" firmwarePaths}"}"
${builtins.readFile ./edido.sh}
'';
}

View File

@@ -0,0 +1,33 @@
{
lib,
python3Packages,
fetchPypi,
}:
python3Packages.buildPythonApplication rec {
pname = "edir";
version = "2.32";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-E9zb7Y4KNQ/gw+TkpRVMUHMPlY1ImQAb0P8G/OFgMwM=";
};
nativeBuildInputs = with python3Packages; [
setuptools-scm
];
propagatedBuildInputs = with python3Packages; [
platformdirs
];
meta = with lib; {
description = "Program to rename and remove files and directories using your editor";
homepage = "https://github.com/bulletmark/edir";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ guyonvarch ];
platforms = platforms.all;
mainProgram = "edir";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchgit,
cwebbin,
libX11,
libXft,
ncurses,
pkg-config,
unzip,
}:
stdenv.mkDerivation {
pname = "edit";
version = "unstable-2021-04-05";
src = fetchgit {
url = "git://c9x.me/ed.git";
rev = "bc24e3d4f716b0afacef559f952c40f0be5a1c58";
hash = "sha256-DzQ+3B96+UzQqL3lhn0DfYmZy2LOANtibj1e1iVR+Jo=";
};
nativeBuildInputs = [
cwebbin
pkg-config
unzip
];
buildInputs = [
libX11
libXft
ncurses
];
preBuild = ''
ctangle vicmd.w
'';
installPhase = ''
runHook preInstall
install -Dm755 obj/edit -t $out/bin
runHook postInstall
'';
meta = {
description = "Relaxing mix of Vi and ACME";
homepage = "https://c9x.me/edit";
license = lib.licenses.publicDomain;
maintainers = [ ];
platforms = lib.platforms.unix;
mainProgram = "edit";
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
nix-update-script,
ncurses ? null,
# Enable `termcap` (`ncurses`) support.
enableTermcap ? false,
}:
assert lib.assertMsg (
enableTermcap -> ncurses != null
) "`ncurses` must be provided when `enableTermcap` is enabled";
stdenv.mkDerivation (finalAttrs: {
pname = "editline";
version = "1.17.1-unstable-2025-05-24";
src = fetchFromGitHub {
owner = "troglobit";
repo = "editline";
rev = "f735e4d1d566cac3caa4a5e248179d07f0babefd";
sha256 = "sha256-MUXxSmhpQd8CZdGGC6Ln9eci85E+GBhlNk28VHUvjaU=";
};
configureFlags = [
# Enable SIGSTOP (Ctrl-Z) behavior.
(lib.enableFeature true "sigstop")
# Enable ANSI arrow keys.
(lib.enableFeature true "arrow-keys")
# Use termcap library to query terminal size.
(lib.enableFeature enableTermcap "termcap")
];
nativeBuildInputs = [ autoreconfHook ];
propagatedBuildInputs = lib.optional enableTermcap ncurses;
outputs = [
"out"
"dev"
"man"
"doc"
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://troglobit.com/projects/editline/";
description = "Readline() replacement for UNIX without termcap (ncurses)";
license = licenses.bsdOriginal;
maintainers = with maintainers; [ oxalica ];
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,48 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
testers,
editorconfig-checker,
}:
buildGoModule rec {
pname = "editorconfig-checker";
version = "3.4.0";
src = fetchFromGitHub {
owner = "editorconfig-checker";
repo = "editorconfig-checker";
rev = "v${version}";
hash = "sha256-9Z2Yu515e2R8NbGmsVD6mM9XHXalutcS++T9I0p1jbY=";
};
vendorHash = "sha256-7UyEvKA+0ll205/P69YfAFswM6fp8zBjzTfCryxMCQU=";
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
ldflags = [ "-X main.version=${version}" ];
postInstall = ''
installManPage docs/editorconfig-checker.1
'';
passthru.tests.version = testers.testVersion {
package = editorconfig-checker;
};
meta = with lib; {
changelog = "https://github.com/editorconfig-checker/editorconfig-checker/releases/tag/${src.rev}";
description = "Tool to verify that your files are in harmony with your .editorconfig";
mainProgram = "editorconfig-checker";
homepage = "https://editorconfig-checker.github.io/";
license = licenses.mit;
maintainers = with maintainers; [
uri-canva
zowoq
];
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pcre2,
doxygen,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "editorconfig-core-c";
version = "0.12.9";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "editorconfig";
repo = "editorconfig-core-c";
tag = "v${finalAttrs.version}";
hash = "sha256-myJNJxKwgmgm+P2MqnYmW8OC0oYcInL+Suyf/xwX9xo=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
doxygen
];
buildInputs = [
pcre2
];
# Multiple doxygen can not generate man pages in the same base directory in
# parallel: https://github.com/doxygen/doxygen/issues/6293
enableParallelBuilding = false;
meta = with lib; {
homepage = "https://editorconfig.org/";
description = "EditorConfig core library written in C";
longDescription = ''
EditorConfig makes it easy to maintain the correct coding style when
switching between different text editors and between different
projects. The EditorConfig project maintains a file format and plugins
for various text editors which allow this file format to be read and used
by those editors. For information on the file format and supported text
editors, see the EditorConfig website.
'';
downloadPage = "https://github.com/editorconfig/editorconfig-core-c";
license = with licenses; [
bsd2
bsd3
];
maintainers = with maintainers; [ dochang ];
platforms = platforms.unix;
mainProgram = "editorconfig";
};
})

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
libXt,
libXaw,
libXres,
utilmacros,
}:
stdenv.mkDerivation rec {
pname = "editres";
version = "1.0.8";
src = fetchurl {
url = "mirror://xorg/individual/app/editres-${version}.tar.gz";
sha256 = "sha256-LVbWB3vHZ6+n4DD+ssNy/mvok/7EApoj9FodVZ/YRq4=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libXt
libXaw
libXres
utilmacros
];
configureFlags = [ "--with-appdefaultdir=$(out)/share/X11/app-defaults/editres" ];
hardeningDisable = [ "format" ];
meta = with lib; {
homepage = "https://cgit.freedesktop.org/xorg/app/editres/";
description = "Dynamic resource editor for X Toolkit applications";
license = licenses.mit;
platforms = platforms.linux;
mainProgram = "editres";
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
edk2,
llvmPackages,
util-linux,
nasm,
python3,
pkgsBuildHost,
}:
edk2.mkDerivation "ShellPkg/ShellPkg.dsc" (finalAttrs: {
pname = "edk2-uefi-shell";
inherit (edk2) version;
nativeBuildInputs = [
util-linux
nasm
python3
]
++ lib.optionals stdenv.cc.isClang [
llvmPackages.bintools
llvmPackages.llvm
];
strictDeps = true;
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.cc.isClang [
"-fno-pic"
"-Qunused-arguments"
]
);
# Set explicitly to use Python 3 from nixpkgs. Otherwise, the build system will detect and try to
# use `/usr/bin/python3` on Darwin when sandboxing is disabled.
PYTHON_COMMAND = "${lib.getBin pkgsBuildHost.python3}/bin/python3";
# We only have a .efi file in $out which shouldn't be patched or stripped
dontPatchELF = true;
dontStrip = true;
# GUID hardcoded to match ShellPkg.dsc
installPhase = ''
runHook preInstall
install -D -m0644 Build/Shell/RELEASE*/*/Shell_EA4BB293-2D7F-4456-A681-1F22F42CD0BC.efi $out/shell.efi
runHook postInstall
'';
passthru.efi = "${finalAttrs.finalPackage}/shell.efi";
meta = {
inherit (edk2.meta) license platforms;
description = "UEFI Shell from Tianocore EFI development kit";
homepage = "https://github.com/tianocore/tianocore.github.io/wiki/ShellPkg";
maintainers = with lib.maintainers; [
LunNova
mjoerg
];
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
};
})

View File

@@ -0,0 +1,27 @@
diff --git i/BaseTools/Source/C/VfrCompile/GNUmakefile w/BaseTools/Source/C/VfrCompile/GNUmakefile
index ad6c350876..bc30e25cd3 100644
--- i/BaseTools/Source/C/VfrCompile/GNUmakefile
+++ w/BaseTools/Source/C/VfrCompile/GNUmakefile
@@ -32,6 +32,9 @@ LINKER = $(CXX)
EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
+CC_FOR_BUILD ?= $(CC)
+CXX_FOR_BUILD ?= $(CXX)
+
MAKEROOT ?= ../..
include $(MAKEROOT)/Makefiles/header.makefile
@@ -61,10 +64,10 @@ VfrLexer.cpp VfrLexer.h: Pccts/dlg/dlg VfrParser.dlg
Pccts/dlg/dlg -C2 -i -CC -cl VfrLexer -o . VfrParser.dlg
Pccts/antlr/antlr:
- $(MAKE) -C Pccts/antlr
+ $(MAKE) -C Pccts/antlr CC=$(CC_FOR_BUILD) CXX=$(CXX_FOR_BUILD)
Pccts/dlg/dlg:
- $(MAKE) -C Pccts/dlg
+ $(MAKE) -C Pccts/dlg CC=$(CC_FOR_BUILD) CXX=$(CXX_FOR_BUILD)
ATokenBuffer.o: Pccts/h/ATokenBuffer.cpp
$(CXX) -c $(VFR_CPPFLAGS) $(INC) $(VFR_CXXFLAGS) $? -o $@

View File

@@ -0,0 +1,196 @@
{
stdenv,
fetchFromGitHub,
fetchpatch,
applyPatches,
libuuid,
bc,
lib,
buildPackages,
nixosTests,
writeScript,
}:
let
pythonEnv = buildPackages.python3.withPackages (ps: [ ps.tkinter ]);
targetArch =
if stdenv.hostPlatform.isi686 then
"IA32"
else if stdenv.hostPlatform.isx86_64 then
"X64"
else if stdenv.hostPlatform.isAarch32 then
"ARM"
else if stdenv.hostPlatform.isAarch64 then
"AARCH64"
else if stdenv.hostPlatform.isRiscV64 then
"RISCV64"
else if stdenv.hostPlatform.isLoongArch64 then
"LOONGARCH64"
else
throw "Unsupported architecture";
in
stdenv.mkDerivation (finalAttrs: {
pname = "edk2";
version = "202508";
srcWithVendoring = fetchFromGitHub {
owner = "tianocore";
repo = "edk2";
tag = "edk2-stable${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-YZcjPGPkUQ9CeJS9JxdHBmpdHsAj7T0ifSZWZKyNPMk=";
};
src = applyPatches {
name = "edk2-${finalAttrs.version}-unvendored-src";
src = finalAttrs.srcWithVendoring;
patches = [
# pass targetPrefix as an env var
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/edk2/raw/08f2354cd280b4ce5a7888aa85cf520e042955c3/f/0021-Tweak-the-tools_def-to-support-cross-compiling.patch";
hash = "sha256-E1/fiFNVx0aB1kOej2DJ2DlBIs9tAAcxoedym2Zhjxw=";
})
./fix-cross-compilation-antlr-dlg.patch
];
# FIXME: unvendor OpenSSL again once upstream updates
# to a compatible version.
# Upstream PR: https://github.com/tianocore/edk2/pull/10946
postPatch = ''
# enable compilation using Clang
# https://bugzilla.tianocore.org/show_bug.cgi?id=4620
substituteInPlace BaseTools/Conf/tools_def.template --replace-fail \
'DEFINE CLANGPDB_WARNING_OVERRIDES = ' \
'DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-unneeded-internal-declaration '
'';
};
nativeBuildInputs = [ pythonEnv ];
depsBuildBuild = [
buildPackages.stdenv.cc
buildPackages.bash
];
depsHostHost = [ libuuid ];
strictDeps = true;
# trick taken from https://src.fedoraproject.org/rpms/edk2/blob/08f2354cd280b4ce5a7888aa85cf520e042955c3/f/edk2.spec#_319
${"GCC5_${targetArch}_PREFIX"} = stdenv.cc.targetPrefix;
makeFlags = [ "-C BaseTools" ];
env = {
NIX_CFLAGS_COMPILE =
"-Wno-return-type"
+ lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation"
+ lib.optionalString (stdenv.hostPlatform.isDarwin) " -Wno-error=macro-redefined";
PYTHON_COMMAND = lib.getExe pythonEnv;
};
hardeningDisable = [
"format"
"fortify"
];
installPhase = ''
runHook preInstall
mkdir -vp $out
mv -v BaseTools $out
mv -v edksetup.sh $out
# patchShebangs fails to see these when cross compiling
for i in $out/BaseTools/BinWrappers/PosixLike/*; do
chmod +x "$i"
patchShebangs --build "$i"
done
runHook postInstall
'';
enableParallelBuilding = true;
meta = {
description = "Intel EFI development kit";
homepage = "https://github.com/tianocore/tianocore.github.io/wiki/EDK-II/";
changelog = "https://github.com/tianocore/edk2/releases/tag/edk2-stable${finalAttrs.version}";
license = lib.licenses.bsd2;
platforms = with lib.platforms; aarch64 ++ arm ++ i686 ++ x86_64 ++ loongarch64 ++ riscv64;
maintainers = [ lib.maintainers.mjoerg ];
};
passthru = {
# exercise a channel blocker
tests = {
systemdBootExtraEntries = nixosTests.systemd-boot.extraEntries;
uefiUsb = nixosTests.boot.uefiCdrom;
};
updateScript = writeScript "update-edk2" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts coreutils gnused
set -eu -o pipefail
version="$(list-git-tags --url="${finalAttrs.srcWithVendoring.url}" |
sed -E --quiet 's/^edk2-stable([0-9]{6})$/\1/p' |
sort --reverse --numeric-sort |
head -n 1)"
if [[ "x$UPDATE_NIX_OLD_VERSION" != "x$version" ]]; then
update-source-version --source-key=srcWithVendoring \
"$UPDATE_NIX_ATTR_PATH" "$version"
fi
'';
mkDerivation =
projectDscPath: attrsOrFun:
stdenv.mkDerivation (
finalAttrsInner:
let
attrs = lib.toFunction attrsOrFun finalAttrsInner;
buildType = attrs.buildType or (if stdenv.hostPlatform.isDarwin then "CLANGPDB" else "GCC5");
in
{
inherit (finalAttrs) src;
depsBuildBuild = [ buildPackages.stdenv.cc ] ++ attrs.depsBuildBuild or [ ];
nativeBuildInputs = [
bc
pythonEnv
]
++ attrs.nativeBuildInputs or [ ];
strictDeps = true;
${"GCC5_${targetArch}_PREFIX"} = stdenv.cc.targetPrefix;
prePatch = ''
rm -rf BaseTools
ln -sv ${buildPackages.edk2}/BaseTools BaseTools
'';
configurePhase = ''
runHook preConfigure
export WORKSPACE="$PWD"
. ${buildPackages.edk2}/edksetup.sh BaseTools
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
build -a ${targetArch} -b ${attrs.buildConfig or "RELEASE"} -t ${buildType} -p ${projectDscPath} -n $NIX_BUILD_CORES $buildFlags
runHook postBuild
'';
installPhase = ''
runHook preInstall
mv -v Build/*/* $out
runHook postInstall
'';
}
// removeAttrs attrs [
"nativeBuildInputs"
"depsBuildBuild"
]
);
};
})

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
python3Packages,
unstableGitUpdater,
}:
python3Packages.buildPythonPackage {
pname = "edl";
version = "3.52.1-unstable-2025-09-10";
format = "setuptools";
src = fetchFromGitHub {
owner = "bkerler";
repo = "edl";
rev = "334028cd887a2960867750c403dbcad9cbe8c46b";
fetchSubmodules = true;
hash = "sha256-OYrncVbCJkeONeztfj7cB3QW1Q0tlF1b/LeuMqKiblk=";
};
propagatedBuildInputs = with python3Packages; [
pyusb
pyserial
docopt
pylzma
pycryptodome
lxml
colorama
capstone
keystone-engine
];
# No tests set up
doCheck = false;
# EDL loaders are ELFs but shouldn't be touched, rest is Python anyways
dontStrip = true;
# edl has a spurious dependency on "usb" which has nothing to do with the
# project and was probably added by accident trying to add pyusb
postPatch = ''
sed -i '/'usb'/d' setup.py
'';
postInstall = ''
mkdir -p $out/etc/udev/rules.d
cp $src/Drivers/51-edl.rules $out/etc/udev/rules.d/51-edl.rules
'';
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
homepage = "https://github.com/bkerler/edl";
description = "Qualcomm EDL tool (Sahara / Firehose / Diag)";
# See https://github.com/NixOS/nixpkgs/issues/348931
license = licenses.unfree;
maintainers = with maintainers; [
lorenz
xddxdd
];
# Case-sensitive files in 'Loader' submodule
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "edlib";
version = "1.3.9.post1";
src = fetchFromGitHub {
owner = "Martinsos";
repo = "edlib";
tag = finalAttrs.version;
hash = "sha256-XejxohLVdBBzpYZ//OpqC1ActmCaZ8tunJyhOYtZmKQ=";
};
nativeBuildInputs = [ cmake ];
doCheck = true;
checkPhase = ''
runHook preCheck
bin/runTests
runHook postCheck
'';
meta = {
homepage = "https://martinsos.github.io/edlib";
description = "Lightweight, fast C/C++ library for sequence alignment using edit distance";
maintainers = with lib.maintainers; [ bcdarwin ];
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "edlin";
version = "2.21";
src =
let
inherit (finalAttrs) version;
in
fetchurl {
url = "mirror://sourceforge/freedos-edlin/freedos-edlin/${version}/edlin-${version}.tar.bz2";
hash = "sha256-lQ/tw8dvEKV81k5GV05o49glOmfYcEeJBmgPUmL3S2I=";
};
postInstall = ''
mkdir -p $out/share/doc/edlin-${finalAttrs.version}/
cp AUTHORS ChangeLog README TODO edlin.htm $out/share/doc/edlin-${finalAttrs.version}/
'';
meta = with lib; {
homepage = "https://sourceforge.net/projects/freedos-edlin/";
description = "FreeDOS line editor";
license = licenses.gpl2Plus;
maintainers = [ ];
platforms = with platforms; unix;
mainProgram = "edlin";
};
})

View File

@@ -0,0 +1,63 @@
{
lib,
fetchFromGitHub,
stdenv,
python3,
makeWrapper,
}:
let
pythonEnv = python3.buildEnv.override {
extraLibs = with python3.pkgs; [
tkinter
requests
pillow
(watchdog.overrideAttrs {
disabledTests = [
"test_select_fd" # Avoid `Too many open files` error. See https://github.com/gorakhargosh/watchdog/issues/1095
];
})
semantic-version
psutil
];
ignoreCollisions = true;
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "edmarketconnector";
version = "5.13.1";
src = fetchFromGitHub {
owner = "EDCD";
repo = "EDMarketConnector";
tag = "Release/${finalAttrs.version}";
hash = "sha256-50OPbAXrDKodN0o6UibGUmMqQ/accF2/gNHnms+8rOI=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons/hicolor/512x512/apps/
ln -s ${finalAttrs.src}/io.edcd.EDMarketConnector.png $out/share/icons/hicolor/512x512/apps/io.edcd.EDMarketConnector.png
mkdir -p "$out/share/applications/"
ln -s "${finalAttrs.src}/io.edcd.EDMarketConnector.desktop" "$out/share/applications/"
makeWrapper ${pythonEnv}/bin/python $out/bin/edmarketconnector \
--add-flags "${finalAttrs.src}/EDMarketConnector.py"
runHook postInstall
'';
meta = {
homepage = "https://github.com/EDCD/EDMarketConnector";
description = "Uploads Elite: Dangerous market data to popular trading tools";
longDescription = "Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.";
changelog = "https://github.com/EDCD/EDMarketConnector/releases/tag/Release%2F${finalAttrs.version}";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.x86_64;
mainProgram = "edmarketconnector";
maintainers = with lib.maintainers; [ jiriks74 ];
};
})

11
pkgs/by-name/ed/edopro/deps.nix generated Normal file
View File

@@ -0,0 +1,11 @@
# This is automatically generated by the update script.
# DO NOT MANUALLY EDIT.
{
assets-hash = "sha256-cta4k6yxrdaFFfum0eshEzLODExBfA+oVPqcOpXG9uk=";
edopro-version = "41.0.2";
edopro-rev = "e5c0578aa504d0831dcbe29dbacd018f7b885b2c";
edopro-hash = "sha256-ZkQXWt73S3Nn+RnkG+e91BId7keI5OpM3NSeDMJWlZY=";
irrlicht-version = "1.9.0-unstable-2025-03-30";
irrlicht-rev = "47264fc2bc3223d110c589c9ffe4339d696a3dd0";
irrlicht-hash = "sha256-AwUCHQOivNgSnYe8kG6JxDIz7H5PC6RoozGiOGUejTI=";
}

View File

@@ -0,0 +1,420 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchzip,
makeWrapper,
premake5,
writeShellApplication,
runCommandLocal,
symlinkJoin,
writeText,
imagemagick,
bzip2,
curl,
envsubst,
flac,
fmt,
freetype,
irrlicht,
libevent,
libgit2,
libGL,
libGLU,
libjpeg,
libpng,
libvorbis,
libX11,
libxkbcommon,
libXxf86vm,
mono,
nlohmann_json,
openal,
SDL2,
sqlite,
wayland,
egl-wayland,
zenity,
covers_url ? "https://pics.projectignis.org:2096/pics/cover/{}.jpg",
fields_url ? "https://pics.projectignis.org:2096/pics/field/{}.png",
# While ygoprodeck has higher quality images:
# 1. automated downloads for sims via their API are discouraged by the owner
# 2. images for prerelease cards are unavailable on their service
pics_url ? "https://pics.projectignis.org:2096/pics/{}.jpg",
}:
let
archLabel =
{
"x86_64-linux" = "x64";
"aarch64-linux" = "arm64";
}
.${stdenv.hostPlatform.system}
or (throw "${stdenv.hostPlatform.system} is an unsupported arch label for edopro");
maintainers = with lib.maintainers; [
OPNA2608
redhawk
];
deps = import ./deps.nix;
edopro-src = fetchFromGitHub {
owner = "edo9300";
repo = "edopro";
rev = deps.edopro-rev;
fetchSubmodules = true;
hash = deps.edopro-hash;
};
in
let
assets = fetchzip {
url = "https://github.com/ProjectIgnis/edopro-assets/releases/download/${deps.edopro-version}/ProjectIgnis-EDOPro-${deps.edopro-version}-linux.tar.gz";
hash = deps.assets-hash;
};
irrlicht-edopro = stdenv.mkDerivation {
pname = "irrlicht-edopro";
version = deps.irrlicht-version;
src = fetchFromGitHub {
owner = "edo9300";
repo = "irrlicht1-8-4";
rev = deps.irrlicht-rev;
hash = deps.irrlicht-hash;
};
buildInputs = [
libGLU
libX11
libxkbcommon
libXxf86vm
wayland
];
enableParallelBuilding = true;
buildFlags = [ "NDEBUG=1" ];
makeFlags = [
"-C"
"source/Irrlicht"
];
installPhase = ''
runHook preInstall
install -Dm644 -t $out/lib lib/Linux/libIrrlicht.a
cp -r include $out/include
runHook postInstall
'';
meta = {
inherit (irrlicht.meta) description platforms;
homepage = "https://github.com/edo9300/irrlicht1-8-4";
license = lib.licenses.agpl3Plus;
inherit maintainers;
};
};
ocgcore =
let
# Refer to CORENAME EPRO_TEXT in <edopro>/gframe/dllinterface.cpp for this
ocgcoreName = lib.strings.concatStrings [
(lib.optionalString (!stdenv.hostPlatform.isWindows) "lib")
"ocgcore"
(
if stdenv.hostPlatform.isiOS then
"-ios"
else if stdenv.hostPlatform.isAndroid then
(
if stdenv.hostPlatform.isx86_64 then
"x64"
else if stdenv.hostPlatform.isx86_32 then
"x86"
else if stdenv.hostPlatform.isAarch64 then
"v8"
else if stdenv.hostPlatform.isAarch32 then
"v7"
else
throw "Don't know what platform suffix edopro expects for ocgcore on: ${stdenv.hostPlatform.system}"
)
else
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ".aarch64"
)
stdenv.hostPlatform.extensions.sharedLibrary
];
in
stdenv.mkDerivation {
pname = "ocgcore-edopro";
version = deps.edopro-version;
src = edopro-src;
sourceRoot = "${edopro-src.name}/ocgcore";
nativeBuildInputs = [
premake5
];
enableParallelBuilding = true;
buildFlags = [
"verbose=true"
"config=release"
"ocgcoreshared"
];
makeFlags = [
"-C"
"build"
];
# To make sure linking errors are discovered at build time, not when edopro runs into them during loading
env.NIX_LDFLAGS = "--unresolved-symbols=report-all";
installPhase = ''
runHook preInstall
install -Dm644 bin/release/*ocgcore*${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/${ocgcoreName}
runHook postInstall
'';
meta = {
description = "YGOPro script engine";
homepage = "https://github.com/edo9300/ygopro-core";
license = lib.licenses.agpl3Plus;
inherit maintainers;
platforms = lib.platforms.unix;
};
};
edopro = stdenv.mkDerivation {
pname = "edopro";
version = deps.edopro-version;
src = edopro-src;
nativeBuildInputs = [
makeWrapper
premake5
];
buildInputs = [
bzip2
curl
flac
fmt
freetype
irrlicht-edopro
libevent
libgit2
libjpeg
libpng
libvorbis
nlohmann_json
openal
SDL2
sqlite
];
# nixpkgs' gcc stack currently appears to not support LTO
# Override where bundled ocgcore get looked up in, so we can supply ours
# (can't use --prebuilt-core or let it build a core on its own without making core updates impossible)
postPatch = ''
substituteInPlace premake5.lua \
--replace-fail 'flags "LinkTimeOptimization"' 'removeflags "LinkTimeOptimization"'
substituteInPlace gframe/game.cpp \
--replace-fail 'ocgcore = LoadOCGcore(Utils::GetWorkingDirectory())' 'ocgcore = LoadOCGcore("${lib.getLib ocgcore}/lib/")'
touch ocgcore/premake5.lua
'';
preBuild = ''
premake5 gmake2 \
--architecture=${archLabel} \
--covers=\"${covers_url}\" \
--fields=\"${fields_url}\" \
--pics=\"${pics_url}\" \
--no-core \
--sound=sfml
'';
enableParallelBuilding = true;
env = {
# remove after release 40.1.4+
# https://discord.com/channels/170601678658076672/792223685112889344/1286043823293599785
CXXFLAGS = "-include cstdint";
LDFLAGS = "-I ${irrlicht-edopro}/include -L ${irrlicht-edopro}/bin";
};
buildFlags = [
"verbose=true"
"config=release_${archLabel}"
"ygoprodll"
];
makeFlags = [
"-C"
"build"
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp bin/${archLabel}/release/ygoprodll $out/bin
wrapProgram $out/bin/ygoprodll \
--prefix PATH : ${lib.makeBinPath [ mono ]} \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
libGL
libX11
libxkbcommon
libXxf86vm
sqlite
wayland
egl-wayland
]
}
runHook postInstall
'';
meta = {
description = "Bleeding-edge automatic duel simulator, a fork of the YGOPro client";
homepage = "https://projectignis.github.io";
changelog = "https://github.com/edo9300/edopro/releases";
license = lib.licenses.agpl3Plus;
mainProgram = "ygoprodll";
# This is likely a very easy app to port if you're interested.
# We just have no way to test on other platforms.
platforms = [
"x86_64-linux"
# Currently offline mode does not work, the problem is that the core is updated whenever it is needed.
# So in our method we would have to update the client if it's statically linked as well.
# It is possible but we have decided against it for now. In theory if we added more logic to the update script it could work.
"aarch64-linux"
];
inherit maintainers;
};
};
edopro-script =
let
assetsToCopy = lib.concatStringsSep "," [
# Needed if we download files from ProjectIgnis' website or any https-only website.
"cacert.pem"
"config"
"deck"
"COPYING.txt"
"expansions"
"lflists"
"notices"
"puzzles"
"fonts"
"script"
"skin"
"sound"
"textures"
"WindBot"
];
wrapperZenityMessageTemplate = writeText "edopro-wrapper-multiple-versions-message.txt.in" ''
Nixpkgs' EDOPro wrapper has found more than 1 directory in: ''${EDOPRO_BASE_DIR}
We expected the only directory to be: ''${EDOPRO_DIR}
There may have been an update, requiring you to migrate any files you care about from an older version.
Examples include:
- decks/*
- config/system.conf - which has your client's settings
- any custom things you may have installed into: fonts, skins, script, sound, ...
- anything you wish to preserve from: replay, screenshots
Once you have copied over everything important to ''${EDOPRO_DIR}, delete the old version's path.
'';
in
writeShellApplication {
name = "edopro";
runtimeInputs = [
envsubst
zenity
];
text = ''
export EDOPRO_VERSION="${deps.edopro-version}"
export EDOPRO_BASE_DIR="''${XDG_DATA_HOME:-$HOME/.local/share}/edopro"
export EDOPRO_DIR="''${EDOPRO_BASE_DIR}/''${EDOPRO_VERSION}"
# If versioned directory doesn't exist yet, make it & copy over assets
if [ ! -d "$EDOPRO_DIR" ]; then
mkdir -p "$EDOPRO_DIR"
cp -r --no-preserve=all ${assets}/{${assetsToCopy}} "$EDOPRO_DIR"
chmod -R go-rwx "$EDOPRO_DIR"
rm "$EDOPRO_DIR"/config/io.github.edo9300.EDOPro.desktop.in
fi
# Different versions provide different assets. Some are necessary for the game to run properly (configs for
# where to get incremental updates from, online servers, card scripting, certificates for communication etc),
# and some are optional nice-haves (example decks). It's also possible to override assets with custom skins.
#
# Don't try to manage all of this across versions, just inform the user that they may need to migrate their
# files if it looks like there are multiple versions.
edoproTopDirs="$(find "$EDOPRO_BASE_DIR" -mindepth 1 -maxdepth 1 -type d | wc -l)"
if [ "$edoproTopDirs" -ne 1 ]; then
zenity \
--info \
--title='[NIX] Multiple asset copies found' \
--text="$(envsubst < ${wrapperZenityMessageTemplate})" \
--ok-label='Continue to EDOPro'
fi
exec ${lib.getExe edopro} -C "$EDOPRO_DIR" "$@"
'';
};
edopro-desktop = runCommandLocal "io.github.edo9300.EDOPro.desktop" { } ''
mkdir -p $out/share/applications
sed ${assets}/config/io.github.edo9300.EDOPro.desktop.in \
-e '/Path=/d' \
-e 's/Exec=.*/Exec=edopro/' \
-e 's/Icon=.*/Icon=edopro/' \
-e 's/StartupWMClass=.*/StartupWMClass=edopro/' \
>$out/share/applications/io.github.edo9300.EDOPro.desktop
'';
in
symlinkJoin {
name = "edopro-application-${deps.edopro-version}";
version = deps.edopro-version;
paths = [
edopro-script
edopro-desktop
];
postBuild = ''
for size in 16 32 48 64 128 256 512 1024; do
res="$size"x"$size"
mkdir -p $out/share/icons/hicolor/"$res"/apps/
${imagemagick}/bin/magick \
${assets}/textures/AppIcon.png \
-resize "$res" \
$out/share/icons/hicolor/"$res"/apps/edopro.png
done
'';
passthru.updateScript = ./update.py;
meta = {
inherit (edopro.meta)
description
homepage
changelog
license
platforms
maintainers
;
# To differentiate it from the original YGOPro
mainProgram = "edopro";
};
}

104
pkgs/by-name/ed/edopro/update.py Executable file
View File

@@ -0,0 +1,104 @@
#!/usr/bin/env nix-shell
#! nix-shell -i python -p nix-prefetch-github python3Packages.githubkit
import json
import subprocess
import sys
from githubkit import GitHub, UnauthAuthStrategy
from githubkit.versions.latest.models import (
Commit,
ContentSubmodule,
Tag,
)
DEPS_PATH: str = "./pkgs/by-name/ed/edopro/deps.nix"
with GitHub(UnauthAuthStrategy()) as github:
edopro: Tag = github.rest.repos.list_tags("edo9300", "edopro").parsed_data[0]
# This dep is not versioned in any way and is why we check below to see if this is a new version.
irrlicht: Commit = github.rest.repos.list_commits(
"edo9300", "irrlicht1-8-4"
).parsed_data[0]
edopro_working_version: str = ""
try:
with open(DEPS_PATH, "r") as file:
for line in file.readlines():
if "edopro-version" in line:
edopro_working_version = line.split('"')[1]
except FileNotFoundError:
print("Error: Dep file not found.", file=sys.stderr)
exit(2)
if edopro_working_version == "":
print("Working version is unbound", file=sys.stderr)
exit(5)
if edopro_working_version == edopro.name:
print("Version is updated")
exit(0)
def get_hash(owner: str, repo: str, rev: str, submodule: bool = False) -> str:
args: list[str] = ["nix-prefetch-github", owner, repo, "--rev", rev]
if submodule:
args.append("--fetch-submodules")
out: subprocess.CompletedProcess = subprocess.run(args, capture_output=True)
out_json = json.loads(out.stdout.decode())
return out_json["hash"]
edopro_hash = get_hash("edo9300", "edopro", edopro.commit.sha, submodule=True)
irrlicht_hash = get_hash("edo9300", "irrlicht1-8-4", irrlicht.sha)
asset_legacy_hash: str = (
subprocess.run(
[
"nix-prefetch-url",
f"https://github.com/ProjectIgnis/edopro-assets/releases/download/{edopro.name}/ProjectIgnis-EDOPro-{edopro.name}-linux.tar.gz",
"--unpack",
],
capture_output=True,
)
.stdout.decode()
.strip()
)
asset_hash: str = (
subprocess.run(
[
"nix",
"--extra-experimental-features",
"nix-command",
"hash",
"to-sri",
"--type",
"sha256",
asset_legacy_hash,
],
capture_output=True,
)
.stdout.decode()
.strip()
)
with open(DEPS_PATH, "w") as file:
contents = f"""# This is automatically generated by the update script.
# DO NOT MANUALLY EDIT.
{{
assets-hash = "{asset_hash}";
edopro-version = "{edopro.name}";
edopro-rev = "{edopro.commit.sha}";
edopro-hash = "{edopro_hash}";
irrlicht-version = "{"1.9.0-unstable-" + irrlicht.commit.committer.date.strftime("%Y-%m-%d")}";
irrlicht-rev = "{irrlicht.sha}";
irrlicht-hash = "{irrlicht_hash}";
}}
"""
file.write(contents)

View File

@@ -0,0 +1,34 @@
{
stdenvNoCC,
lib,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "edukai";
version = "5.0";
src = fetchzip {
name = "${pname}-${version}";
url = "https://language.moe.gov.tw/001/Upload/Files/site_content/M0001/edukai-${version}.zip";
sha256 = "sha256-3+w9n6GJQg9+HfHYukC7tlm4GVs8vEOO23hrLw6qjTY=";
};
installPhase = ''
mkdir -p $out/share/fonts/
mv *.ttf $out/share/fonts/
'';
meta = {
description = "MOE Standard Kai Font, a Chinese font by the Ministry of Education, ROC (Taiwan)";
longDescription = ''
The MOE Standard Kai Font is a kai (regular srcipt) font
provided by
the Midistry of Education, Republic of China (Taiwan).
It currently includes 13,076 Chinese characters.
'';
homepage = "http://language.moe.gov.tw/result.aspx?classify_sn=23&subclassify_sn=436&content_sn=47";
license = lib.licenses.cc-by-nd-30;
maintainers = with lib.maintainers; [ ShamrockLee ];
};
}

View File

@@ -0,0 +1,23 @@
diff --git a/GNUmakefile b/GNUmakefile
index f83f04d..25a4fa8 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -798,6 +798,9 @@ libklzw$(DLLSUFFIX): $(engine_src)/klzw.cpp
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER_C) -shared -fPIC $< -o $@ $(RECIPE_RESULT_COMPILE)
+%.png: %.bmp
+ gm convert $< $@
+
# to debug the tools link phase, make a copy of this rule explicitly replacing % with the name of a tool, such as kextract
%$(EXESUFFIX): $(tools_obj)/%.$o $(foreach i,tools $(tools_deps),$(call expandobjs,$i))
$(LINK_STATUS)
@@ -880,7 +883,7 @@ $$($1_obj)/%.$$o: $$($1_rsrc)/%.c | $$($1_obj)
$$(call MKDIR,$$(dir $$@))
$$(RECIPE_IF) $$(COMPILER_C) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
-$$($1_obj)/%_banner.c: $$($1_rsrc)/%.bmp | $$($1_obj)
+$$($1_obj)/%_banner.c: $$($1_rsrc)/%.png | $$($1_obj)
echo "#include \"gtkpixdata_shim.h\"" > $$@
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $$^ | sed 's/load_inc//' >> $$@

View File

@@ -0,0 +1,191 @@
{
lib,
stdenv,
fetchFromGitLab,
makeWrapper,
pkg-config,
nasm,
makeDesktopItem,
copyDesktopItems,
alsa-lib,
flac,
libvorbis,
libvpx,
libGL,
SDL2,
SDL2_mixer,
xorg,
graphicsmagick,
unstableGitUpdater,
}:
let
wrapper = "eduke32-wrapper";
swWrapper = "voidsw-wrapper";
furyWrapper = "fury-wrapper";
in
stdenv.mkDerivation (finalAttrs: {
pname = "eduke32";
version = "0-unstable-2025-09-13";
src = fetchFromGitLab {
domain = "voidpoint.io";
owner = "terminx";
repo = "eduke32";
rev = "e5aad188685d005f8ad65478384693fc0dc0c83f";
hash = "sha256-0iICExzsw/l/QjGJDJ6X+08+dzwsA+6tjaOWKNrXsjs=";
deepClone = true;
leaveDotGit = true;
postFetch = ''
cd $out
git rev-list --count HEAD > VC_REV
rm -rf .git
'';
};
patches = [
# gdk-pixbuf-csource no longer supports bmp so convert to png
# patch GNUMakefile to use graphicsmagick to convert bmp -> png
./convert-bmp-to-png.diff
];
buildInputs = [
flac
libvorbis
libvpx
SDL2
SDL2_mixer
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libGL
xorg.libX11
];
nativeBuildInputs = [
makeWrapper
pkg-config
copyDesktopItems
graphicsmagick
]
++ lib.optionals (stdenv.hostPlatform.system == "i686-linux") [
nasm
];
postPatch = ''
substituteInPlace source/imgui/src/imgui_impl_sdl2.cpp \
--replace-fail '#include <SDL.h>' '#include <SDL2/SDL.h>' \
--replace-fail '#include <SDL_syswm.h>' '#include <SDL2/SDL_syswm.h>' \
--replace-fail '#include <SDL_vulkan.h>' '#include <SDL2/SDL_vulkan.h>'
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
for f in glad.c glad_wgl.c ; do
substituteInPlace source/glad/src/$f \
--replace-fail libGL.so ${libGL}/lib/libGL.so
done
'';
makeFlags = [
"SDLCONFIG=${SDL2}/bin/sdl2-config"
"VC_HASH=${lib.substring 0 9 finalAttrs.src.rev}"
"VC_BRANCH=master"
"HAVE_GTK2=0"
];
buildFlags = [
"duke3d"
"sw"
];
preConfigure = ''
appendToVar makeFlags "VC_REV=$(cat VC_REV)"
'';
desktopItems = [
(makeDesktopItem {
name = "eduke32";
icon = "eduke32";
exec = "${wrapper}";
comment = "Duke Nukem 3D port";
desktopName = "Enhanced Duke Nukem 3D";
genericName = "Duke Nukem 3D port";
categories = [ "Game" ];
})
(makeDesktopItem {
name = "voidsw";
icon = "voidsw";
exec = "${swWrapper}";
comment = "Shadow Warrior eduke32 source port";
desktopName = "VoidSW";
genericName = "Shadow Warrior source port";
categories = [ "Game" ];
})
(makeDesktopItem {
name = "fury";
icon = "fury";
exec = "${furyWrapper}";
comment = "Ion Fury eduke32 source port";
desktopName = "Ion Fury";
genericName = "Ion Fury source port";
categories = [ "Game" ];
})
];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin eduke32 mapster32 voidsw wangulator
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
makeWrapper $out/bin/eduke32 $out/bin/${wrapper} \
--set-default EDUKE32_DATA_DIR /var/lib/games/eduke32 \
--add-flags '-j"$EDUKE32_DATA_DIR"' \
--add-flags '-gamegrp DUKE3D.GRP'
makeWrapper $out/bin/voidsw $out/bin/${swWrapper} \
--set-default EDUKE32_DATA_DIR /var/lib/games/eduke32 \
--add-flags '-j"$EDUKE32_DATA_DIR"'
makeWrapper $out/bin/eduke32 $out/bin/${furyWrapper} \
--set-default EDUKE32_DATA_DIR /var/lib/games/eduke32 \
--add-flags '-j"$EDUKE32_DATA_DIR"' \
--add-flags '-gamegrp FURY.GRP'
mkdir -p $out/share/icons/hicolor/scalable/apps
gm convert "./source/duke3d/rsrc/game_icon.ico[10]" $out/share/icons/hicolor/scalable/apps/eduke32.png
install -Dm644 ./source/sw/rsrc/game_icon.svg $out/share/icons/hicolor/scalable/apps/voidsw.svg
gm convert "./source/duke3d/rsrc/fury/game_icon.ico[4]" $out/share/icons/hicolor/scalable/apps/fury.png
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications/EDuke32.app/Contents/MacOS
mkdir -p $out/Applications/Mapster32.app/Contents/MacOS
mkdir -p $out/Applications/VoidSW.app/Contents/MacOS
mkdir -p $out/Applications/Wangulator.app/Contents/MacOS
cp -r platform/Apple/bundles/EDuke32.app/* $out/Applications/EDuke32.app/
cp -r platform/Apple/bundles/Mapster32.app/* $out/Applications/Mapster32.app/
cp -r platform/Apple/bundles/VoidSW.app/* $out/Applications/VoidSW.app/
cp -r platform/Apple/bundles/Wangulator.app/* $out/Applications/Wangulator.app/
ln -sf $out/bin/eduke32 $out/Applications/EDuke32.app/Contents/MacOS/eduke32
ln -sf $out/bin/mapster32 $out/Applications/Mapster32.app/Contents/MacOS/mapster32
ln -sf $out/bin/voidsw $out/Applications/VoidSW.app/Contents/MacOS/voidsw
ln -sf $out/bin/wangulator $out/Applications/Wangulator.app/Contents/MacOS/wangulator
''
+ ''
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
meta = {
description = "Enhanched port of Duke Nukem 3D for various platforms";
homepage = "http://eduke32.com";
license = with lib.licenses; [ gpl2Plus ];
maintainers = with lib.maintainers; [
qubitnano
sander
];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,37 @@
{
stdenvNoCC,
lib,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "eduli";
version = "3.0";
src = fetchzip {
name = "${pname}-${version}";
url = "https://language.moe.gov.tw/001/Upload/Files/site_content/M0001/MoeLI-3.0.zip";
hash = "sha256-bDQtLugYPWwJJNusBLEJrgIVufocRK4NIR0CCGaTkyw=";
};
installPhase = ''
mkdir -p $out/share/fonts/
for name in *.ttf; do
mv "$name" "$out/share/fonts/$(echo $name | sed -r 's/(.*)\(.*\)\.ttf/\1.ttf/')"
done
'';
meta = {
description = "MOE Li Font, a clerical Chinese font by the Ministry of Education, ROC (Taiwan)";
longDescription = ''
The MOE Li Font is a li (clerical srcipt) font
provided by
the Midistry of Education, Republic of China (Taiwan).
It currently includes 4,808 Chinese characters.
The clerical script (lishu) is an archaic style of Chinese calligraphy.
'';
homepage = "http://language.moe.gov.tw/result.aspx?classify_sn=23&subclassify_sn=436&content_sn=49";
license = lib.licenses.cc-by-nd-30;
maintainers = with lib.maintainers; [ ShamrockLee ];
};
}

View File

@@ -0,0 +1,31 @@
{
stdenvNoCC,
lib,
fetchzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "edusong";
version = "4.0";
src = fetchzip {
name = "edusong-${finalAttrs.version}";
url = "https://language.moe.gov.tw/001/Upload/Files/site_content/M0001/eduSong_Unicode.zip";
hash = "sha256-4NBnwMrYufeZbgSiD2fAhe4tuy0aAA5u9tWwjQQjEQk=";
};
installPhase = ''
mkdir -p $out/share/fonts/
mv eduSong_Unicode*.ttf $out/share/fonts/eduSong_Unicode\(202412\).ttf
'';
meta = {
description = "MOE Song font, a Song-style Chinese character typeface";
longDescription = ''
A Song-style Chinese character typeface published by the Ministry of Education of the Republic of China (Taiwan). The Song style is also referred to as , , sòngtǐ, , , or míngtǐ, in Chinese; , , or myeongjo in Korean; , , or minchōtai in Japanese.
'';
homepage = "https://language.moe.gov.tw/result.aspx?classify_sn=23&subclassify_sn=436&content_sn=48";
license = lib.licenses.cc-by-nd-30;
maintainers = with lib.maintainers; [ ShamrockLee ];
};
})

View File

@@ -0,0 +1,66 @@
{
lib,
fetchFromGitea,
gdk-pixbuf,
gobject-introspection,
gtk3,
libnotify,
libsecret,
networkmanager,
python3Packages,
wrapGAppsHook3,
}:
python3Packages.buildPythonApplication rec {
pname = "eduvpn-client";
version = "4.5.1";
format = "pyproject";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "eduVPN";
repo = "linux-app";
rev = version;
hash = "sha256-lDmPDM3BEiZ97m8jEtYrpmVrk0D7x01iKxOe/09T0zY=";
};
nativeBuildInputs = [
gdk-pixbuf
gobject-introspection
wrapGAppsHook3
];
buildInputs = [
gtk3
libnotify
libsecret
networkmanager
];
propagatedBuildInputs = with python3Packages; [
eduvpn-common
pygobject3
setuptools
];
postInstall = ''
ln -s $out/${python3Packages.python.sitePackages}/eduvpn/data/share/ $out/share
'';
checkInputs = with python3Packages; [
pytestCheckHook
];
meta = {
changelog = "https://codeberg.org/eduVPN/linux-app/raw/tag/${version}/CHANGES.md";
description = "Linux client for eduVPN";
homepage = "https://codeberg.org/eduVPN/linux-app";
license = lib.licenses.gpl3Plus;
mainProgram = "eduvpn-gui";
maintainers = with lib.maintainers; [
benneti
jwijenbergh
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation rec {
pname = "edwin";
version = "0.54";
src = fetchurl {
url = "https://github.com/MuseScoreFonts/Edwin/archive/refs/tags/v${version}.tar.gz";
hash = "sha256-F6BzwnrsaELegdo6Bdju1OG+RI9zKnn4tIASR3q6zYk=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/opentype
install *.otf $out/share/fonts/opentype
runHook postInstall
'';
meta = with lib; {
description = "Text font for musical scores";
homepage = "https://github.com/MuseScoreFonts/Edwin";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ moni ];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
buildGoModule,
fetchFromGitHub,
makeWrapper,
plan9port,
}:
buildGoModule rec {
pname = "edwood";
version = "0.3.1";
src = fetchFromGitHub {
owner = "rjkroege";
repo = "edwood";
rev = "v${version}";
hash = "sha256-jKDwNq/iMFqVpPq14kZa+T5fES54f4BAujXUwGlbiTE=";
};
vendorHash = "sha256-M7fa46BERNRHbCsAiGqt4GHVVTyrW6iIb6gRc4UuZxA=";
nativeBuildInputs = [
makeWrapper
];
ldflags = [
"-s"
"-w"
];
postInstall = ''
mkdir -p $out/share
cp -r build/font $out/share
wrapProgram $out/bin/edwood \
--prefix PATH : ${lib.makeBinPath [ "${plan9port}/plan9" ]} \
--set PLAN9 $out/share # envvar is read by edwood to determine the font path prefix
'';
doCheck = false; # Tests has lots of hardcoded mess.
meta = with lib; {
description = "Go version of Plan9 Acme Editor";
homepage = "https://github.com/rjkroege/edwood";
license = with licenses; [
mit
bsd3
];
maintainers = with maintainers; [ kranzes ];
mainProgram = "edwood";
};
}