Refactor Nix package definitions to use buildPythonPackage and buildPythonApplication, update dependencies, and remove obsolete packages including pureref, rmlint, steam, and talk. Update webcomix to version 3.12.0 with new dependencies and runtime checks.
This commit is contained in:
parent
bf9c1796d4
commit
b827ffab8f
@ -46,7 +46,7 @@
|
|||||||
let
|
let
|
||||||
content = builtins.readFile path;
|
content = builtins.readFile path;
|
||||||
in
|
in
|
||||||
if builtins.match ".*buildPythonPackage.*" content != null
|
if builtins.match ".*(buildPythonPackage|buildPythonApplication).*" content != null
|
||||||
then pkgs.python3Packages.callPackage path { }
|
then pkgs.python3Packages.callPackage path { }
|
||||||
else pkgs.callPackage path { };
|
else pkgs.callPackage path { };
|
||||||
in
|
in
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
python3Packages,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
|
gevent,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "gevent-eventemitter";
|
pname = "gevent-eventemitter";
|
||||||
version = "2.1";
|
version = "2.1";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
@ -16,12 +19,12 @@ python3Packages.buildPythonPackage rec {
|
|||||||
hash = "sha256-aW4OsQi3N5yAMdbTd8rxbb2qYMfFJBR4WQFIXvxpiMw=";
|
hash = "sha256-aW4OsQi3N5yAMdbTd8rxbb2qYMfFJBR4WQFIXvxpiMw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
build-system = with python3Packages; [
|
build-system = [
|
||||||
setuptools
|
setuptools
|
||||||
wheel
|
wheel
|
||||||
];
|
];
|
||||||
|
|
||||||
dependencies = with python3Packages; [
|
dependencies = [
|
||||||
gevent
|
gevent
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
python3Packages,
|
buildPythonPackage,
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "inputs";
|
pname = "inputs";
|
||||||
version = "0.5";
|
version = "0.5";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
@ -17,8 +19,8 @@ python3Packages.buildPythonPackage rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
build-system = [
|
build-system = [
|
||||||
python3Packages.setuptools
|
setuptools
|
||||||
python3Packages.wheel
|
wheel
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
|
|||||||
@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
appimageTools,
|
|
||||||
runCommand,
|
|
||||||
curl,
|
|
||||||
gnugrep,
|
|
||||||
cacert,
|
|
||||||
fetchurl,
|
|
||||||
copyDesktopItems,
|
|
||||||
makeDesktopItem,
|
|
||||||
}:
|
|
||||||
|
|
||||||
appimageTools.wrapType1 rec {
|
|
||||||
pname = "pureref";
|
|
||||||
version = "2.0.3";
|
|
||||||
|
|
||||||
src =
|
|
||||||
runCommand "PureRef-${version}_x64.Appimage"
|
|
||||||
{
|
|
||||||
nativeBuildInputs = [
|
|
||||||
curl
|
|
||||||
gnugrep
|
|
||||||
cacert
|
|
||||||
];
|
|
||||||
outputHash = "sha256-0iR1cP2sZvWWqKwRAwq6L/bmIBSYHKrlI8u8V2hANfM=";
|
|
||||||
}
|
|
||||||
''
|
|
||||||
key="$(curl -A 'nixpkgs/Please contact maintainer if there is an issue' "https://www.pureref.com/download.php" --silent | grep '%3D%3D' | cut -d '"' -f2)"
|
|
||||||
curl -L "https://www.pureref.com/files/build.php?build=LINUX64.Appimage&version=${version}&downloadKey=$key" --output $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
icon = fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/nextcloud/talk-desktop/refs/tags/v1.0.0/img/icons/icon.png";
|
|
||||||
hash = "sha256-DteSSuxIs0ukIJrvUO/3Mrh5F2GG5UAVvGRZUuZonkg=";
|
|
||||||
};
|
|
||||||
nativeBuildInputs = [
|
|
||||||
copyDesktopItems
|
|
||||||
];
|
|
||||||
|
|
||||||
desktopItems = [
|
|
||||||
(makeDesktopItem {
|
|
||||||
type = "Application";
|
|
||||||
name = "pureref";
|
|
||||||
desktopName = "PureRef";
|
|
||||||
# comment = finalAttrs.meta.description;
|
|
||||||
# exec = finalAttrs.meta.mainProgram;
|
|
||||||
icon = "pureref";
|
|
||||||
categories = [
|
|
||||||
"Graphics"
|
|
||||||
"2DGraphics"
|
|
||||||
"RasterGraphics"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Reference Image Viewer";
|
|
||||||
homepage = "https://www.pureref.com";
|
|
||||||
license = licenses.unfree;
|
|
||||||
maintainers = with maintainers; [
|
|
||||||
elnudev
|
|
||||||
husjon
|
|
||||||
];
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,106 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
cairo,
|
|
||||||
elfutils,
|
|
||||||
fetchFromGitHub,
|
|
||||||
fetchpatch,
|
|
||||||
glib,
|
|
||||||
gobject-introspection,
|
|
||||||
gtksourceview3,
|
|
||||||
json-glib,
|
|
||||||
makeWrapper,
|
|
||||||
pango,
|
|
||||||
pkg-config,
|
|
||||||
polkit,
|
|
||||||
python3,
|
|
||||||
scons,
|
|
||||||
sphinx,
|
|
||||||
util-linux,
|
|
||||||
wrapGAppsHook3,
|
|
||||||
withGui ? false,
|
|
||||||
}:
|
|
||||||
|
|
||||||
assert withGui -> !stdenv.hostPlatform.isDarwin;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "rmlint";
|
|
||||||
version = "2.10.2";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "sahib";
|
|
||||||
repo = "rmlint";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "sha256-pOo1YfeqHUU6xyBRFbcj2lX1MHJ+a5Hi31BMC1nYZGo=";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
# pass through NIX_* environment variables to scons.
|
|
||||||
./rmlint/scons-nix-env.patch
|
|
||||||
# fix #664
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/sahib/rmlint/commit/f0ca57ec907f7199e3670038d60b4702d1e1d8e2.patch";
|
|
||||||
hash = "sha256-715X+R2BcQIaUV76hoO+EXPfNheOfw4OIHsqSoruIUI=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
pkg-config
|
|
||||||
sphinx
|
|
||||||
scons
|
|
||||||
]
|
|
||||||
++ lib.optionals withGui [
|
|
||||||
makeWrapper
|
|
||||||
wrapGAppsHook3
|
|
||||||
gobject-introspection
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
glib
|
|
||||||
json-glib
|
|
||||||
util-linux
|
|
||||||
]
|
|
||||||
++ lib.optionals withGui [
|
|
||||||
cairo
|
|
||||||
gtksourceview3
|
|
||||||
pango
|
|
||||||
polkit
|
|
||||||
python3
|
|
||||||
python3.pkgs.pygobject3
|
|
||||||
]
|
|
||||||
++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [
|
|
||||||
elfutils
|
|
||||||
];
|
|
||||||
|
|
||||||
prePatch = ''
|
|
||||||
# remove sources of nondeterminism
|
|
||||||
substituteInPlace lib/cmdline.c \
|
|
||||||
--replace "__DATE__" "\"Jan 1 1970\"" \
|
|
||||||
--replace "__TIME__" "\"00:00:00\""
|
|
||||||
substituteInPlace docs/SConscript \
|
|
||||||
--replace "gzip -c " "gzip -cn "
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Otherwise tries to access /usr.
|
|
||||||
prefixKey = "--prefix=";
|
|
||||||
|
|
||||||
sconsFlags = lib.optionals (!withGui) [ "--without-gui" ];
|
|
||||||
|
|
||||||
# in GUI mode, this shells out to itself, and tries to import python modules
|
|
||||||
postInstall = lib.optionalString withGui ''
|
|
||||||
gappsWrapperArgs+=(--prefix PATH : "$out/bin")
|
|
||||||
gappsWrapperArgs+=(--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${python3.pkgs.pygobject3}):$(toPythonPath ${python3.pkgs.pycairo})")
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Extremely fast tool to remove duplicates and other lint from your filesystem";
|
|
||||||
homepage = "https://rmlint.readthedocs.org";
|
|
||||||
platforms = platforms.unix;
|
|
||||||
license = licenses.gpl3;
|
|
||||||
maintainers = with maintainers; [
|
|
||||||
aaschmid
|
|
||||||
koral
|
|
||||||
];
|
|
||||||
mainProgram = "rmlint";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
scons does not use os environment by default:
|
|
||||||
https://scons.org/doc/2.1.0/HTML/scons-user/x1750.html
|
|
||||||
|
|
||||||
nixpkgs' cc-wrapper on the other hand relies on various NIX_* variables
|
|
||||||
to be passed through like NIX_CFLAGS_COMPILE_BEFORE.
|
|
||||||
--- a/SConstruct
|
|
||||||
+++ b/SConstruct
|
|
||||||
@@ -559,10 +559,7 @@ options = dict(
|
|
||||||
SHLINKCOMSTR=link_shared_library_message,
|
|
||||||
LINKCOMSTR=link_program_message,
|
|
||||||
PREFIX=GetOption('prefix'),
|
|
||||||
- ENV = dict([ (key, os.environ[key])
|
|
||||||
- for key in os.environ
|
|
||||||
- if key in ['PATH', 'TERM', 'HOME', 'PKG_CONFIG_PATH']
|
|
||||||
- ])
|
|
||||||
+ ENV = os.environ,
|
|
||||||
)
|
|
||||||
|
|
||||||
if ARGUMENTS.get('VERBOSE') == "1":
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
python3Packages,
|
|
||||||
fetchFromGitHub,
|
|
||||||
callPackage,
|
|
||||||
}:
|
|
||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "steam";
|
|
||||||
version = "1.4.4";
|
|
||||||
pyproject = true;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ValvePython";
|
|
||||||
repo = "steam";
|
|
||||||
rev = version;
|
|
||||||
hash = "sha256-OY04GsX3KMPvpsQl8sUurzFyJu+JKpES8B0iD6Z5uyw=";
|
|
||||||
};
|
|
||||||
|
|
||||||
build-system = with python3Packages; [
|
|
||||||
setuptools
|
|
||||||
wheel
|
|
||||||
];
|
|
||||||
|
|
||||||
dependencies =
|
|
||||||
with python3Packages;
|
|
||||||
[
|
|
||||||
six
|
|
||||||
pycryptodomex
|
|
||||||
requests
|
|
||||||
urllib3
|
|
||||||
vdf
|
|
||||||
gevent
|
|
||||||
protobuf
|
|
||||||
cachetools
|
|
||||||
cryptography
|
|
||||||
]
|
|
||||||
++ [ (callPackage ./gevent-eventemitter.nix { }) ];
|
|
||||||
|
|
||||||
pythonImportsCheck = [
|
|
||||||
"steam"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Python package for interacting with Steam";
|
|
||||||
homepage = "https://github.com/ValvePython/steam";
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
maintainers = with lib.maintainers; [ CaptainJawZ ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
113
pkgs_pr/talk.nix
113
pkgs_pr/talk.nix
@ -1,113 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
fetchurl,
|
|
||||||
fetchzip,
|
|
||||||
autoPatchelfHook,
|
|
||||||
copyDesktopItems,
|
|
||||||
makeDesktopItem,
|
|
||||||
nss,
|
|
||||||
cairo,
|
|
||||||
xorg,
|
|
||||||
libxkbcommon,
|
|
||||||
alsa-lib,
|
|
||||||
at-spi2-core,
|
|
||||||
mesa,
|
|
||||||
pango,
|
|
||||||
libdrm,
|
|
||||||
vivaldi-ffmpeg-codecs,
|
|
||||||
gtk3,
|
|
||||||
libGL,
|
|
||||||
libglvnd,
|
|
||||||
systemd,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "nextcloud-talk-desktop";
|
|
||||||
version = "1.0.0";
|
|
||||||
|
|
||||||
# Building from source would require building also building Server and Talk components
|
|
||||||
# See https://github.com/nextcloud/talk-desktop?tab=readme-ov-file#%EF%B8%8F-prerequisites
|
|
||||||
src = fetchzip {
|
|
||||||
url = "https://github.com/nextcloud-releases/talk-desktop/releases/download/v${finalAttrs.version}/Nextcloud.Talk-linux-x64.zip";
|
|
||||||
hash = "sha256-XQa4Fa9eEaFlYrWa00S9aMWKJOPPFGSo4NAlRqE23jM=";
|
|
||||||
stripRoot = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
icon = fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/nextcloud/talk-desktop/refs/tags/v1.0.0/img/icons/icon.png";
|
|
||||||
hash = "sha256-DteSSuxIs0ukIJrvUO/3Mrh5F2GG5UAVvGRZUuZonkg=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
autoPatchelfHook
|
|
||||||
copyDesktopItems
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
nss
|
|
||||||
cairo
|
|
||||||
alsa-lib
|
|
||||||
at-spi2-core
|
|
||||||
pango
|
|
||||||
libdrm
|
|
||||||
libxkbcommon
|
|
||||||
gtk3
|
|
||||||
vivaldi-ffmpeg-codecs
|
|
||||||
mesa
|
|
||||||
libGL
|
|
||||||
libglvnd
|
|
||||||
]
|
|
||||||
++ (with xorg; [
|
|
||||||
libX11
|
|
||||||
libXcomposite
|
|
||||||
libXdamage
|
|
||||||
libXrandr
|
|
||||||
libXfixes
|
|
||||||
libXcursor
|
|
||||||
]);
|
|
||||||
|
|
||||||
# Required to launch the application and proceed past the zygote_linux fork() process
|
|
||||||
# Fixes `Zygote could not fork`
|
|
||||||
runtimeDependencies = [ systemd ];
|
|
||||||
|
|
||||||
desktopItems = [
|
|
||||||
(makeDesktopItem {
|
|
||||||
type = "Application";
|
|
||||||
name = "nextcloud-talk-desktop";
|
|
||||||
desktopName = "Nextcloud Talk";
|
|
||||||
comment = finalAttrs.meta.description;
|
|
||||||
exec = finalAttrs.meta.mainProgram;
|
|
||||||
icon = "nextcloud-talk-desktop";
|
|
||||||
categories = [ "Chat" ];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
preInstall = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
mkdir -p $out/opt
|
|
||||||
|
|
||||||
cp -r $src/* $out/opt/
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
# Link the application in $out/bin away from contents of `preInstall`
|
|
||||||
ln -s "$out/opt/Nextcloud Talk-linux-x64/Nextcloud Talk" $out/bin/nextcloud-talk-desktop
|
|
||||||
mkdir -p $out/share/icons/hicolor/512x512/apps
|
|
||||||
cp $icon $out/share/icons/hicolor/512x512/apps/nextcloud-talk-desktop.png
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Nextcloud Talk Desktop Client";
|
|
||||||
homepage = "https://github.com/nextcloud/talk-desktop";
|
|
||||||
changelog = "https://github.com/nextcloud/talk-desktop/blob/${finalAttrs.version}/CHANGELOG.md";
|
|
||||||
license = licenses.agpl3Only;
|
|
||||||
maintainers = with maintainers; [ kashw2 ];
|
|
||||||
mainProgram = "nextcloud-talk-desktop";
|
|
||||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
@ -1,19 +1,27 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
python3Packages,
|
buildPythonApplication,
|
||||||
|
poetry-core,
|
||||||
|
click,
|
||||||
|
tqdm,
|
||||||
|
scrapy,
|
||||||
|
scrapy-splash,
|
||||||
|
scrapy-fake-useragent,
|
||||||
|
pytest-rerunfailures,
|
||||||
|
docker,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
pname = "webcomix";
|
pname = "webcomix";
|
||||||
version = "3.11.1";
|
version = "3.12.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "J-CPelletier";
|
owner = "J-CPelletier";
|
||||||
repo = "webcomix";
|
repo = "webcomix";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-vs7IE1IQ6/2uOYqLUskW4vGFdoz8z/ZBYQPteTcdOR0=";
|
hash = "sha256-Vsn6Ju4+SG8iOCxnqixnpi9apr8Nc4/mFjpjipPud6g=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -24,10 +32,10 @@ python3Packages.buildPythonApplication rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
build-system = [
|
build-system = [
|
||||||
python3Packages.poetry-core
|
poetry-core
|
||||||
];
|
];
|
||||||
|
|
||||||
dependencies = with python3Packages; [
|
dependencies = [
|
||||||
click
|
click
|
||||||
tqdm
|
tqdm
|
||||||
scrapy
|
scrapy
|
||||||
@ -42,6 +50,9 @@ python3Packages.buildPythonApplication rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
# Skip runtime dependency check due to version mismatches with nixpkgs
|
||||||
|
dontCheckRuntimeDeps = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Webcomic downloader";
|
description = "Webcomic downloader";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user