Merge staging-next into staging

This commit is contained in:
nixpkgs-ci[bot] 2025-06-09 06:06:55 +00:00 committed by GitHub
commit 6994b8f921
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 148 additions and 150 deletions

View file

@ -2180,7 +2180,8 @@ The following rules are desired to be respected:
* Make sure the tests are enabled using for example [`pytestCheckHook`](#using-pytestcheckhook) and, in the case of
libraries, are passing for all interpreters. If certain tests fail they can be
disabled individually. Try to avoid disabling the tests altogether. In any
case, when you disable tests, leave a comment explaining why.
case, when you disable tests, leave a comment explaining not only _what_ the failure
is but _why_ the test failure can be ignored for safe distribution with nixpkgs.
* `pythonImportsCheck` is set. This is still a good smoke test even if `pytestCheckHook` is set.
* `meta.platforms` takes the default value in many cases.
It does not need to be set explicitly unless the package requires a specific platform.

View file

@ -24,8 +24,8 @@ let
sha256Hash = "sha256-tPRTDFyKGPR1DKuJRBcwjWjNxylS/8Zv/Nd6vBmcujg=";
};
latestVersion = {
version = "2025.1.2.2"; # "Android Studio Narwhal Feature Drop | 2025.1.2 Canary 2"
sha256Hash = "sha256-zQ3PK9Fq8iYocSRFsYXNrnJ34QJGUkQoLtSNhFA2Ido=";
version = "2025.1.2.4"; # "Android Studio Narwhal Feature Drop | 2025.1.2 Canary 4"
sha256Hash = "sha256-MhonmDupcXGvwWUB+p/9AkqxCP9+j8a7D1bCseEu8GY=";
};
in
{

View file

@ -5,7 +5,7 @@
"packages": {
"": {
"dependencies": {
"@sourcegraph/amp": "^0.0.1748865683-g71e54e"
"@sourcegraph/amp": "^0.0.1749297687-g3e4f54"
}
},
"node_modules/@colors/colors": {
@ -29,9 +29,9 @@
}
},
"node_modules/@sourcegraph/amp": {
"version": "0.0.1748865683-g71e54e",
"resolved": "https://registry.npmjs.org/@sourcegraph/amp/-/amp-0.0.1748865683-g71e54e.tgz",
"integrity": "sha512-ZiNbIbgCb/l7Q7wRT0sva6Ju7VDtq7+lijMWK8jotPorTq1DYUy3h7XJIOjyJEdvqlQkEfwrnbOfREmsnwlPyg==",
"version": "0.0.1749297687-g3e4f54",
"resolved": "https://registry.npmjs.org/@sourcegraph/amp/-/amp-0.0.1749297687-g3e4f54.tgz",
"integrity": "sha512-KfAu6Ju4aeTKW3dQ17GmaVXJ+96IqUMCC8KJlb1uzOBcNudGVnwYogjkEAMu4N3hg1PJH6XcrimqmFRqPZb1+Q==",
"dependencies": {
"@types/runes": "^0.4.3",
"@vscode/ripgrep": "1.15.11",

View file

@ -9,11 +9,11 @@
buildNpmPackage (finalAttrs: {
pname = "amp-cli";
version = "0.0.1748865683-g71e54e";
version = "0.0.1749297687-g3e4f54";
src = fetchzip {
url = "https://registry.npmjs.org/@sourcegraph/amp/-/amp-${finalAttrs.version}.tgz";
hash = "sha256-kkQKjw1SzDjV8/206i+NUyxeDhZ/35My9gyXRe/U7I8=";
hash = "sha256-WreJsyqyW/Z+TUPnQC7sKIpSgdpIzXQTgkXBthKCMZ4=";
};
postPatch = ''
@ -45,7 +45,7 @@ buildNpmPackage (finalAttrs: {
chmod +x bin/amp-wrapper.js
'';
npmDepsHash = "sha256-yeZ5UCVUCbVjpYTYYN5mI6eCkShtnCKxumjpb5GRCws=";
npmDepsHash = "sha256-dAJePSRKnXrdW8hr72JNxunQAiUtxH53sDrtYYX6++0=";
propagatedBuildInputs = [
ripgrep

View file

@ -44,7 +44,8 @@ stdenv.mkDerivation {
prePatch = ''
substituteInPlace etc/Makefile.am \
--replace-fail 02770 0770
--replace-fail 02770 0770 \
--replace-fail '../../../$(pkglibdir)' '$(pkglibdir)'
'';
postPatch = ''

View file

@ -14,14 +14,14 @@
python3Packages.buildPythonPackage rec {
pname = "boxflat";
version = "1.31.0";
version = "1.32.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Lawstorant";
repo = "boxflat";
tag = "v${version}";
hash = "sha256-2x7voGnbvaUg1G2SfdjD0QPVXolHkUcrwGyoclnOLMo=";
hash = "sha256-zxaBz2ooo+h3a9svtC+j23EhpH8TTQIxjdRDCnhAvJ4=";
};
build-system = [ python3Packages.setuptools ];

View file

@ -84,8 +84,6 @@ stdenv.mkDerivation (finalAttrs: {
license = licenses.lgpl21Only;
platforms = platforms.unix;
maintainers = with maintainers; [ markuskowa ];
# generate_codebook only built for host platform
broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
pkgConfigModules = [ "codec2" ];
};
})

View file

@ -13,7 +13,7 @@
stdenvNoCC.mkDerivation rec {
pname = "cura-appimage";
version = "5.10.0";
version = "5.10.1";
# Give some good names so the intermediate packages are easy
# to recognise by name in the Nix store.
@ -22,7 +22,7 @@ stdenvNoCC.mkDerivation rec {
src = fetchurl {
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/Ultimaker-Cura-${version}-linux-X64.AppImage";
hash = "sha256-8Km249t0m4YnOsyXyjJJD0y4n9kUCrA/AcsqBcrVf5Q=";
hash = "sha256-c89GkgfOSY4hriY66GUCgBYiiJJspM9Fg07lne+KXgw=";
};
appimageContents = appimageTools.extract {

View file

@ -16,7 +16,7 @@ buildGoModule rec {
hash = "sha256-k6j7DIwK8YAKmEjn8JJO7XBcap9ui6cgUSJG7CeHAAM=";
};
vendorHash = "sha256-lV6dUl+OMUQfhlgNL38k0Re1Mr3VP9b8SI3vTJ8CP18=";
vendorHash = "sha256-l3IKvcO10C+PVDX962tFWny7eMNC48ATIVqiHjpVH/Y=";
meta = with lib; {
description = "Tool to check missing hosted DNS zones";

View file

@ -1,7 +1,7 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
pkg-config,
meson,
ninja,
@ -10,13 +10,15 @@
python3Packages,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "fwupd-efi";
version = "1.6";
version = "1.7";
src = fetchurl {
url = "https://github.com/fwupd/fwupd-efi/releases/download/${version}/fwupd-efi-${version}.tar.xz";
hash = "sha256-r9CAWirQgafK/y71vABM46AUe1OAFejsqWY0FxaxJg4=";
src = fetchFromGitHub {
owner = "fwupd";
repo = "fwupd-efi";
rev = "${finalAttrs.version}";
hash = "sha256-PcVqnnFrxedkhYgm+8EUF2I65R5gTXqbVrk69Pw1m1g=";
};
nativeBuildInputs = [
@ -43,9 +45,10 @@ stdenv.mkDerivation rec {
"-Defi-ldsdir=${gnu-efi}/lib"
"-Defi_sbat_distro_id=nixos"
"-Defi_sbat_distro_summary=NixOS"
"-Defi_sbat_distro_pkgname=${pname}"
"-Defi_sbat_distro_version=${version}"
"-Defi_sbat_distro_pkgname=${finalAttrs.pname}"
"-Defi_sbat_distro_version=${finalAttrs.version}"
"-Defi_sbat_distro_url=https://search.nixos.org/packages?channel=unstable&show=fwupd-efi&from=0&size=50&sort=relevance&query=fwupd-efi"
"-Dgenpeimg=disabled"
];
meta = with lib; {
@ -54,4 +57,4 @@ stdenv.mkDerivation rec {
license = licenses.lgpl21Plus;
platforms = platforms.linux;
};
}
})

View file

@ -10,29 +10,27 @@
python3,
}:
let
bgrabitmap = fetchFromGitHub {
owner = "bgrabitmap";
repo = "bgrabitmap";
rev = "2814b069d55f726b9f3b4774d85d00dd72be9c05";
hash = "sha256-YibwdhlgjgI30gqYsKchgDPlOSpBiDBDJNlUDFMygGs=";
};
bgracontrols = fetchFromGitHub {
owner = "bgrabitmap";
repo = "bgracontrols";
rev = "v8.0";
hash = "sha256-5L05eGVN+xncd0/0XLFN6EL2ux4aAOsiU0BMoy0dKgg=";
};
in
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "lazpaint";
version = "7.2.2-unstable-2024-01-23";
version = "7.3";
src = fetchFromGitHub {
owner = "bgrabitmap";
repo = "lazpaint";
rev = "45a7a471d531d6adb5ee557ff917a99af76e92f1";
hash = "sha256-KgCxSK72Ow29T58mlcYCJiS4D0Ov2/p37c1FSNgKZew=";
tag = "v${finalAttrs.version}";
hash = "sha256-yT1HyvJcYEJgMkQxzCSD8s7/ttemxZaur9T+As8WdIo=";
};
bgrabitmap = fetchFromGitHub {
owner = "bgrabitmap";
repo = "bgrabitmap";
tag = "v11.6.6";
hash = "sha256-bA8tvo7Srm5kIZTVWEA2+gjqHab7LByyL/zqdQxeFlA=";
};
bgracontrols = fetchFromGitHub {
owner = "bgrabitmap";
repo = "bgracontrols";
tag = "v9.0.2";
hash = "sha256-HqX9n4VpOyMwTz3fTweTTqzW+jA2BU62mm/X7Iwjd/8=";
};
nativeBuildInputs = [
@ -59,8 +57,8 @@ stdenv.mkDerivation {
runHook preBuild
export HOME=$(mktemp -d)
cp -r --no-preserve=mode ${bgrabitmap} bgrabitmap
cp -r --no-preserve=mode ${bgracontrols} bgracontrols
cp -r --no-preserve=mode ${finalAttrs.bgrabitmap} bgrabitmap
cp -r --no-preserve=mode ${finalAttrs.bgracontrols} bgracontrols
lazbuild --lazarusdir=${lazarus-qt5}/share/lazarus \
--build-mode=ReleaseQt5 \
@ -86,4 +84,4 @@ stdenv.mkDerivation {
maintainers = with lib.maintainers; [ aleksana ];
mainProgram = "lazpaint";
};
}
})

View file

@ -13,7 +13,7 @@ buildGoModule rec {
owner = "logdyhq";
repo = "logdy-core";
tag = "v${version}";
hash = "sha256-779ZO9WhE3IKbHJLchCfrIepMH+GOrlQJALLpoNZvbc=";
hash = "sha256-hhmzTJn136J8DZ719WSu8tafRp8s4MBj6vDVWYTfFyc=";
};
vendorHash = "sha256-kFhcbBMymzlJ+2zw7l09LJfCdps26Id+VzOehqrLDWU=";

View file

@ -20,14 +20,14 @@
python3Packages.buildPythonApplication rec {
pname = "newelle";
version = "0.9.7";
version = "0.9.8";
pyproject = false; # uses meson
src = fetchFromGitHub {
owner = "qwersyk";
repo = "Newelle";
tag = version;
hash = "sha256-h0dWjnUqWcPdSbR60HF2KvQxUyYeR3qHf2GMHt/kSm0=";
hash = "sha256-VyUng/ZX8+wInRX705IWdBgTbX439R60h62ONdpZ0+8=";
};
postPatch = ''

View file

@ -7,16 +7,16 @@
buildGoModule {
pname = "pkgsite";
version = "0-unstable-2025-05-23";
version = "0-unstable-2025-06-08";
src = fetchFromGitHub {
owner = "golang";
repo = "pkgsite";
rev = "0e6de173c6b5ef31749de2ae384bb05ddc6726ba";
hash = "sha256-WRNw+BjUY8/gj7tcPs0Ifz47JtBlU+SEIt12EZmtOjw=";
rev = "82c52f1754cd0ea741a56981d4830176071531d3";
hash = "sha256-bI5jVmCM5pSdiT+OJGrg1pBQ6ozPbXdZzrdLxr9cMUU=";
};
vendorHash = "sha256-s8uYvMQENqeUN8DbZ/jNhcTe2dJeiE9UYPCPGeScO10=";
vendorHash = "sha256-dZKm3dMI969HKPBrC95vVmY1cZmjy+NWq7xOzXsTE14=";
subPackages = [ "cmd/pkgsite" ];

View file

@ -9,13 +9,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "plasma-panel-colorizer";
version = "4.2.0";
version = "4.3.0";
src = fetchFromGitHub {
owner = "luisbocanegra";
repo = "plasma-panel-colorizer";
tag = "v${finalAttrs.version}";
hash = "sha256-fqhuW7SoUluUJU0tv1MIUX1IhOn3j514Hlrdxlnqvvg=";
hash = "sha256-B0aP49udYTV/zfEdZS4uvkGG4wZUScqTVn9+d5SYCEQ=";
};
nativeBuildInputs = [

View file

@ -8,11 +8,11 @@
stdenv.mkDerivation (finalAttrs: {
pname = "scite";
version = "5.5.6";
version = "5.5.7";
src = fetchurl {
url = "https://www.scintilla.org/scite${lib.replaceStrings [ "." ] [ "" ] finalAttrs.version}.tgz";
hash = "sha256-VmNP6NepkF7Ln9eh9pfStmch9nwIKKZTOYxkeduSxrI=";
hash = "sha256-L/UceHGFgFbzUPvc2VBehXXJNmwyyPwBfgxvuv3Vxu8=";
};
nativeBuildInputs = [

View file

@ -10,13 +10,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "tailwindcss-language-server";
version = "0.14.19";
version = "0.14.21";
src = fetchFromGitHub {
owner = "tailwindlabs";
repo = "tailwindcss-intellisense";
tag = "v${finalAttrs.version}";
hash = "sha256-lAZ3BoecPB3+zmI8RataAcbk32avV9Ie+Ek6q/JcXnU=";
hash = "sha256-UmeaNCMuXSPVuzYAjOhhHkKkTcsBnjLbB3oeXG8uv5U=";
};
pnpmDeps = pnpm_9.fetchDeps {
@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
pnpmWorkspaces
prePnpmInstall
;
hash = "sha256-TxWaapm/nkyMi3JCj6TE56DhJYPBWBDGXOnzgB9uPjs=";
hash = "sha256-SUEq20gZCiTDkFuNgMc5McHBPgW++8P9Q1MJb7a7pY8=";
};
nativeBuildInputs = [

View file

@ -11,7 +11,7 @@
buildGoModule rec {
pname = "vale";
version = "3.11.2";
version = "3.12.0";
subPackages = [ "cmd/vale" ];
@ -19,10 +19,10 @@ buildGoModule rec {
owner = "errata-ai";
repo = "vale";
tag = "v${version}";
hash = "sha256-7wBMdATN2kAXUG6fWwq/8JifLrhxDjjPWlZSA47yrxM=";
hash = "sha256-j228Gt2cHkO1XZv+KqH6U8EjttQzDZiOMLppdJUJwvA=";
};
vendorHash = "sha256-Zhhp/qbwGTQEZ28S+p7GJodwQcnkFNqNU7WCZKdeoz0=";
vendorHash = "sha256-3gmgKcpCEeFjHpm+iKQvm4Cv5UfzFrcDDNIAnlY/a5s=";
ldflags = [
"-s"

View file

@ -210,6 +210,12 @@ buildFHSEnv {
substituteInPlace $out/share/applications/com.tencent.wechat.desktop \
--replace-quiet 'Exec=/usr/bin/wechat' "Exec=$out/bin/wechat-uos --"
# See https://github.com/NixOS/nixpkgs/issues/413491
sed -i \
-e '/\[Desktop Entry\]/a\' \
-e 'StartupWMClass=wechat' \
$out/share/applications/com.tencent.wechat.desktop
'';
targetPkgs = pkgs: [ wechat-uos-env ];

View file

@ -16,14 +16,14 @@
buildPythonPackage rec {
pname = "aioamazondevices";
version = "3.0.5";
version = "3.0.6";
pyproject = true;
src = fetchFromGitHub {
owner = "chemelli74";
repo = "aioamazondevices";
tag = "v${version}";
hash = "sha256-CgIkrq5Eni7Iva/bzlcbj1/mqtKPA4mknHC/fQzL7RU=";
hash = "sha256-+o3LOp0gSjG1/x5IFA0FK5LQUFG9T6JgDLb104vJcM0=";
};
build-system = [ poetry-core ];

View file

@ -13,14 +13,14 @@
buildPythonPackage rec {
pname = "aioimmich";
version = "0.9.0";
version = "0.9.1";
pyproject = true;
src = fetchFromGitHub {
owner = "mib1185";
repo = "aioimmich";
tag = "v${version}";
hash = "sha256-s2W/Z/psCLvd7zMsaaYi3ZIcEuuRSpyRSvUUfIPe8a4=";
hash = "sha256-bEbWvDNcKH/9Mtr3fZMk7+Qa41suSUpVAGAsnCmzGaY=";
};
postPatch = ''

View file

@ -16,14 +16,14 @@
buildPythonPackage rec {
pname = "google-genai";
version = "1.17.0";
version = "1.19.0";
pyproject = true;
src = fetchFromGitHub {
owner = "googleapis";
repo = "python-genai";
tag = "v${version}";
hash = "sha256-ks8MU+Sg6TM57QiNmZD6rTGF8Di32mKtHFTF1pCTouQ=";
hash = "sha256-p9W34v1ToLwketM+wOfrouLLl9pFBljL5doykuZRINo=";
};
build-system = [

View file

@ -33,7 +33,7 @@ buildPythonPackage rec {
];
# tests raise an exception if the system is not Linux or Windows
doCheck = !stdenv.isDarwin;
doCheck = !stdenv.buildPlatform.isDarwin;
# tests require gotify-server to be located in ./tests/test-server/gotify-linux-{arch}
postPatch = ''

View file

@ -11,14 +11,14 @@
buildPythonPackage rec {
pname = "netbox-routing";
version = "0.3.0";
version = "0.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "DanSheps";
repo = "netbox-routing";
tag = "v${version}";
hash = "sha256-QJ4/6eRPo2SIgOWNiK+3jrXW+KaXvzERLcXQqKwCNDU=";
hash = "sha256-qtGzZDRo80pdmt3CbM+HG/S7uLvLS7V6lHNB8sM6bcA=";
};
build-system = [ setuptools ];

View file

@ -2,53 +2,39 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
cryptography,
charset-normalizer,
pythonOlder,
pytestCheckHook,
setuptools,
replaceVars,
setuptools-scm,
ocrmypdf,
}:
buildPythonPackage rec {
pname = "pdfminer-six";
version = "20240706";
version = "20250506";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "pdfminer";
repo = "pdfminer.six";
tag = version;
hash = "sha256-aY7GQADRxeiclr6/G3RRgrPcl8rGiC85JYEIjIa+vG0=";
hash = "sha256-BE/HMl/e1KnkSc2jXU5Du5FMF+rCBv5AJ7a88oFrBgM=";
};
patches = [
# https://github.com/pdfminer/pdfminer.six/pull/1027
(fetchpatch2 {
name = "fix-dereference-MediaBox.patch";
url = "https://github.com/pdfminer/pdfminer.six/pull/1027/commits/ad101c152c71431a21bfa5a8dbe33b3ba385ceec.patch?full_index=1";
excludes = [ "CHANGELOG.md" ];
hash = "sha256-fsSXvN92MVtNFpAst0ctvGrbxVvoe4Nyz4wMZqJ1aw8=";
})
(replaceVars ./disable-setuptools-git-versioning.patch {
inherit version;
})
build-system = [
setuptools
setuptools-scm
];
build-system = [ setuptools ];
dependencies = [
charset-normalizer
cryptography
];
postInstall = ''
for file in $out/bin/*.py; do
ln $file ''${file//.py/}
for file in "$out/bin/"*.py; do
mv "$file" "''${file%.py}"
done
'';
@ -71,11 +57,11 @@ buildPythonPackage rec {
};
};
meta = with lib; {
meta = {
changelog = "https://github.com/pdfminer/pdfminer.six/blob/${src.rev}/CHANGELOG.md";
description = "PDF parser and analyzer";
homepage = "https://github.com/pdfminer/pdfminer.six";
license = licenses.mit;
maintainers = with maintainers; [ psyanticy ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ psyanticy ];
};
}

View file

@ -1,16 +0,0 @@
diff --git a/setup.py b/setup.py
index 42764e2..e7b93d3 100644
--- a/setup.py
+++ b/setup.py
@@ -19,10 +19,7 @@ if sys.version_info < (3, 12):
setup(
name="pdfminer.six",
- setuptools_git_versioning={
- "enabled": True,
- },
- setup_requires=["setuptools-git-versioning<3"],
+ version="@version@",
packages=["pdfminer"],
package_data={"pdfminer": ["cmap/*.pickle.gz", "py.typed"]},
install_requires=[

View file

@ -1,8 +1,9 @@
{
lib,
pkgs,
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
jupyterlab,
nbexec,
pandas,
@ -14,33 +15,29 @@
pytest-parallel,
pytestCheckHook,
types-pillow,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "pdfplumber";
version = "0.11.5";
format = "setuptools";
version = "0.11.6";
pyproject = true;
src = fetchFromGitHub {
owner = "jsvine";
repo = "pdfplumber";
tag = "v${version}";
hash = "sha256-oe6lZyQKXASzG7Ho6o7mlXY+BOgVBaACebxbYD+1+x0=";
hash = "sha256-ljoM252w0oOqTUgYT6jtAW+jElPU9a49K6Atwdv5Dvo=";
};
build-system = [ setuptools ];
dependencies = [
pdfminer-six
pillow
pypdfium2
];
preCheck = ''
export HOME=$(mktemp -d)
# test_issue_1089 assumes the soft limit on open files is "low", otherwise it never completes
# reported at: https://github.com/jsvine/pdfplumber/issues/1263
ulimit -n 1024
'';
nativeCheckInputs = [
pkgs.ghostscript
jupyterlab
@ -51,6 +48,16 @@ buildPythonPackage rec {
pytest-parallel
pytestCheckHook
types-pillow
writableTmpDirAsHomeHook
];
pythonRelaxDeps = [ "pdfminer.six" ];
disabledTestPaths = [
# AssertionError
"tests/test_convert.py::Test::test_cli_csv"
"tests/test_convert.py::Test::test_cli_csv_exclude"
"tests/test_convert.py::Test::test_csv"
];
pythonImportsCheck = [ "pdfplumber" ];

View file

@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "pdoc";
version = "15.0.3";
version = "15.0.4";
disabled = pythonOlder "3.9";
pyproject = true;
@ -23,8 +23,8 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "mitmproxy";
repo = "pdoc";
rev = "v${version}";
hash = "sha256-qr0K+ZOmEPWMkm/cPisdw6gSPZI4FvICaKQNt/sef40=";
tag = "v${version}";
hash = "sha256-l0aaQbjxAMcTZZwDN6g8A7bjSsl6yP2FoAnwTYkKYH8=";
};
build-system = [ setuptools ];

View file

@ -11,7 +11,6 @@
xz,
freetype,
fontconfig,
nlohmann_json,
curl,
icu,
harfbuzz,
@ -35,30 +34,43 @@
alsa-lib,
libjack2,
makeWrapper,
buildPackages,
}:
let
opengfx = fetchzip {
url = "https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip";
sha256 = "sha256-daJ/Qwg/okpmLQkXcCjruIiP8GEwyyp02YWcGQepxzs=";
hash = "sha256-daJ/Qwg/okpmLQkXcCjruIiP8GEwyyp02YWcGQepxzs=";
};
opensfx = fetchzip {
url = "https://cdn.openttd.org/opensfx-releases/1.0.3/opensfx-1.0.3-all.zip";
sha256 = "sha256-QmfXizrRTu/fUcVOY7tCndv4t4BVW+fb0yUi8LgSYzM=";
hash = "sha256-QmfXizrRTu/fUcVOY7tCndv4t4BVW+fb0yUi8LgSYzM=";
};
openmsx = fetchzip {
url = "https://cdn.openttd.org/openmsx-releases/0.4.2/openmsx-0.4.2-all.zip";
sha256 = "sha256-Cgrg2m+uTODFg39mKgX+hE8atV7v5bVyZd716vSZB8M=";
hash = "sha256-Cgrg2m+uTODFg39mKgX+hE8atV7v5bVyZd716vSZB8M=";
};
# OpenTTD builds and uses some of its own tools during the build and we need those to be available for cross-compilation.
# Build the tools for buildPlatform with minimal dependencies, using the "OPTION_TOOLS_ONLY" flag.
crossTools = buildPackages.openttd.overrideAttrs (oldAttrs: {
pname = "openttd-tools";
buildInputs = [ ];
cmakeFlags = oldAttrs.cmakeFlags or [ ] ++ [ (lib.cmakeBool "OPTION_TOOLS_ONLY" true) ];
installPhase = ''
install -Dm555 src/strgen/strgen -t $out/bin
install -Dm555 src/settingsgen/settingsgen -t $out/bin
'';
});
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "openttd";
version = "14.1";
src = fetchzip {
url = "https://cdn.openttd.org/openttd-releases/${version}/${pname}-${version}-source.tar.xz";
url = "https://cdn.openttd.org/openttd-releases/${finalAttrs.version}/openttd-${finalAttrs.version}-source.tar.xz";
hash = "sha256-YT4IE/rJ9pnpeMWKbOra6AbSUwW19RwOKlXkxwoMeKY=";
};
@ -72,11 +84,16 @@ stdenv.mkDerivation rec {
})
];
nativeBuildInputs = [
nativeBuildInputs =
[
cmake
pkg-config
makeWrapper
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
crossTools
];
buildInputs =
[
SDL2
@ -85,7 +102,6 @@ stdenv.mkDerivation rec {
zlib
freetype
fontconfig
nlohmann_json
curl
icu
harfbuzz
@ -107,9 +123,7 @@ stdenv.mkDerivation rec {
libjack2
];
prefixKey = "--prefix-dir=";
configureFlags = [ "--without-liblzo2" ];
strictDeps = true;
postPatch = ''
substituteInPlace src/music/fluidsynth.cpp \
@ -128,7 +142,7 @@ stdenv.mkDerivation rec {
tar -xf ${openmsx}/*.tar -C $out/share/games/openttd/baseset
'';
meta = with lib; {
meta = {
description = ''Open source clone of the Microprose game "Transport Tycoon Deluxe"'';
mainProgram = "openttd";
longDescription = ''
@ -142,12 +156,12 @@ stdenv.mkDerivation rec {
- observe as spectators
'';
homepage = "https://www.openttd.org/";
changelog = "https://cdn.openttd.org/openttd-releases/${version}/changelog.txt";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [
changelog = "https://cdn.openttd.org/openttd-releases/${finalAttrs.version}/changelog.txt";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
jcumming
fpletz
];
};
}
})