eb04659fc2
This was achieved using the following command: sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b') And then manually reverted the following changes: - alias in top-level.nix - function name in wrap-gapps-hook.sh - comment in postFixup of at-spi2-core - comment in gtk4 - comment in preFixup of 1password-gui/linux.nix - comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix - comment in postFixup of telegram-desktop - comment in postFixup of fwupd - buildCommand of mongodb-compass - postFixup of xflux-gui - comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config - description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
99 lines
1.8 KiB
Nix
99 lines
1.8 KiB
Nix
{ lib
|
|
, python310
|
|
, fetchPypi
|
|
, fetchFromGitHub
|
|
, gdk-pixbuf
|
|
, gnome
|
|
, gpsbabel
|
|
, glib-networking
|
|
, glibcLocales
|
|
, gobject-introspection
|
|
, gtk3
|
|
, perl
|
|
, sqlite
|
|
, tzdata
|
|
, webkitgtk
|
|
, wrapGAppsHook3
|
|
, xvfb-run
|
|
}:
|
|
|
|
let
|
|
python = python310.override {
|
|
packageOverrides = (self: super: {
|
|
matplotlib = super.matplotlib.override {
|
|
enableGtk3 = true;
|
|
};
|
|
});
|
|
};
|
|
in python.pkgs.buildPythonApplication rec {
|
|
pname = "pytrainer";
|
|
version = "2.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pytrainer";
|
|
repo = "pytrainer";
|
|
rev = "v${version}";
|
|
hash = "sha256-t61vHVTKN5KsjrgbhzljB7UZdRask7qfYISd+++QbV0=";
|
|
};
|
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
|
sqlalchemy
|
|
python-dateutil
|
|
matplotlib
|
|
lxml
|
|
setuptools
|
|
requests
|
|
gdal
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
gobject-introspection
|
|
wrapGAppsHook3
|
|
];
|
|
|
|
buildInputs = [
|
|
sqlite
|
|
gtk3
|
|
webkitgtk
|
|
glib-networking
|
|
gnome.adwaita-icon-theme
|
|
gdk-pixbuf
|
|
];
|
|
|
|
makeWrapperArgs = [
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ perl gpsbabel ])
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
glibcLocales
|
|
perl
|
|
xvfb-run
|
|
] ++ (with python.pkgs; [
|
|
mysqlclient
|
|
psycopg2
|
|
]);
|
|
|
|
postPatch = ''
|
|
substituteInPlace pytrainer/platform.py \
|
|
--replace 'sys.prefix' "\"$out\""
|
|
'';
|
|
|
|
checkPhase = ''
|
|
env \
|
|
HOME=$TEMPDIR \
|
|
TZDIR=${tzdata}/share/zoneinfo \
|
|
TZ=Europe/Kaliningrad \
|
|
LC_TIME=C \
|
|
xvfb-run -s '-screen 0 800x600x24' \
|
|
${python.interpreter} setup.py test
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/pytrainer/pytrainer";
|
|
description = "Application for logging and graphing sporting excursions";
|
|
mainProgram = "pytrainer";
|
|
maintainers = with maintainers; [ rycee dotlambda ];
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|