edmarketconnector: init at 5.13.1

- `EDMarketConnector` repository: https://github.com/EDCD/EDMarketConnector

From project's description:
Downloads commodity market and other station data from the game
Elite: Dangerous for use with all popular online and offline trading tools.

It's a helper tool for the game Elite: Dangerous. Since the in game
tools for trading and searching aren't that good the community has to
make their own. This tool pulls the information from game and uploads it
to various databases for other players to use.

- A test for the watchdog python package had to be disabled

The test basically always resulted in a `Too many open files` error:

```
       > ===End Flaky Test Report===
       > =========================== short test summary info ============================
       > FAILED tests/test_inotify_c.py::test_select_fd - OSError: [Errno 24] Too many open files: '/build/pytest-of-nixbld/pytest-0/test_select_fd0/new_file'
       > =========== 1 failed, 162 passed, 3 skipped, 3 deselected in 54.29s ============
```

See https://github.com/gorakhargosh/watchdog/issues/1095
This commit is contained in:
jiriks74 2025-03-03 09:45:19 +01:00
parent ef34634200
commit 9d1654b981
No known key found for this signature in database
GPG key ID: 1D5E30D3DB2264DE

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 preInstallPhase
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 postInstallPhase
'';
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 ];
};
})