Merge remote-tracking branch 'origin/master' into staging-next

This commit is contained in:
K900
2025-06-09 18:08:45 +03:00
31 changed files with 2690 additions and 570 deletions
+4
View File
@@ -9,6 +9,10 @@ on:
pull_request_target:
types: [closed, labeled]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
issues: write
+2
View File
@@ -26,6 +26,8 @@
- New hardening flags, `strictflexarrays1` and `strictflexarrays3` were made available, corresponding to the gcc/clang options `-fstrict-flex-arrays=1` and `-fstrict-flex-arrays=3` respectively.
- `vmalert` now supports multiple instances with the option `services.vmalert.instances."".enable`
## Nixpkgs Library {#sec-nixpkgs-release-25.11-lib}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+1
View File
@@ -915,6 +915,7 @@ with lib.maintainers;
eljamm
ethancedwards8
fricklerhandwerk
prince213
wegank
];
scope = "Maintain NGI-supported software.";
@@ -105,7 +105,7 @@ In addition to numerous new and updated packages, this release has the following
- [ivpn](https://www.ivpn.net/), a secure, private VPN with fast WireGuard connections. Available as [services.ivpn](#opt-services.ivpn.enable).
- [vmalert](https://victoriametrics.com/), an alerting engine for VictoriaMetrics. Available as [services.vmalert](#opt-services.vmalert.enable).
- [vmalert](https://victoriametrics.com/), an alerting engine for VictoriaMetrics. Available as [services.vmalert.instances](#opt-services.vmalert.instances._name_.enable).
- [jellyseerr](https://github.com/Fallenbagel/jellyseerr), a web-based requests manager for Jellyfin, forked from Overseerr. Available as [services.jellyseerr](#opt-services.jellyseerr.enable).
+154 -107
View File
@@ -10,9 +10,9 @@ let
format = pkgs.formats.yaml { };
confOpts = concatStringsSep " \\\n" (
mapAttrsToList mkLine (filterAttrs (_: v: v != false) cfg.settings)
);
mkConfOpts =
settings:
concatStringsSep " \\\n" (mapAttrsToList mkLine (filterAttrs (_: v: v != false) settings));
confType =
with types;
let
@@ -33,124 +33,171 @@ let
concatMapStringsSep " " (v: "-${key}=${escapeShellArg (toString v)}") value
else
"-${key}=${escapeShellArg (toString value)}";
vmalertName = name: "vmalert" + lib.optionalString (name != "") ("-" + name);
enabledInstances = lib.filterAttrs (name: conf: conf.enable) config.services.vmalert.instances;
in
{
imports = [
(lib.mkRenamedOptionModule
[ "services" "vmalert" "enable" ]
[ "services" "vmalert" "instances" "" "enable" ]
)
(lib.mkRenamedOptionModule
[ "services" "vmalert" "rules" ]
[ "services" "vmalert" "instances" "" "rules" ]
)
(lib.mkRenamedOptionModule
[ "services" "vmalert" "settings" ]
[ "services" "vmalert" "instances" "" "settings" ]
)
];
# interface
options.services.vmalert = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Wether to enable VictoriaMetrics's `vmalert`.
options.services.vmalert.package = mkPackageOption pkgs "victoriametrics" { };
`vmalert` evaluates alerting and recording rules against a data source, sends notifications via Alertmanager.
'';
};
options.services.vmalert.instances = mkOption {
default = { };
package = mkPackageOption pkgs "victoriametrics" { };
description = ''
Define multiple instances of vmalert.
'';
settings = mkOption {
type = types.submodule {
freeformType = confType;
options = {
type = types.attrsOf (
types.submodule (
{ name, config, ... }:
{
options = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Wether to enable VictoriaMetrics's `vmalert`.
"datasource.url" = mkOption {
type = types.nonEmptyStr;
example = "http://localhost:8428";
description = ''
Datasource compatible with Prometheus HTTP API.
'';
`vmalert` evaluates alerting and recording rules against a data source, sends notifications via Alertmanager.
'';
};
settings = mkOption {
type = types.submodule {
freeformType = confType;
options = {
"datasource.url" = mkOption {
type = types.nonEmptyStr;
example = "http://localhost:8428";
description = ''
Datasource compatible with Prometheus HTTP API.
'';
};
"notifier.url" = mkOption {
type = with types; listOf nonEmptyStr;
default = [ ];
example = [ "http://127.0.0.1:9093" ];
description = ''
Prometheus Alertmanager URL. List all Alertmanager URLs if it runs in the cluster mode to ensure high availability.
'';
};
"rule" = mkOption {
type = with types; listOf path;
description = ''
Path to the files with alerting and/or recording rules.
::: {.note}
Consider using the {option}`services.vmalert.instances.<name>.rules` option as a convenient alternative for declaring rules
directly in the `nix` language.
:::
'';
};
};
};
default = { };
example = {
"datasource.url" = "http://localhost:8428";
"datasource.disableKeepAlive" = true;
"datasource.showURL" = false;
"rule" = [
"http://<some-server-addr>/path/to/rules"
"dir/*.yaml"
];
};
description = ''
`vmalert` configuration, passed via command line flags. Refer to
<https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/README.md#configuration>
for details on supported values.
'';
};
rules = mkOption {
type = format.type;
default = { };
example = {
group = [
{
name = "TestGroup";
rules = [
{
alert = "ExampleAlertAlwaysFiring";
expr = ''
sum by(job)
(up == 1)
'';
}
];
}
];
};
description = ''
A list of the given alerting or recording rules against configured `"datasource.url"` compatible with
Prometheus HTTP API for `vmalert` to execute. Refer to
<https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/README.md#rules>
for details on supported values.
'';
};
};
"notifier.url" = mkOption {
type = with types; listOf nonEmptyStr;
default = [ ];
example = [ "http://127.0.0.1:9093" ];
description = ''
Prometheus Alertmanager URL. List all Alertmanager URLs if it runs in the cluster mode to ensure high availability.
'';
};
"rule" = mkOption {
type = with types; listOf path;
description = ''
Path to the files with alerting and/or recording rules.
::: {.note}
Consider using the {option}`services.vmalert.rules` option as a convenient alternative for declaring rules
directly in the `nix` language.
:::
'';
};
};
};
default = { };
example = {
"datasource.url" = "http://localhost:8428";
"datasource.disableKeepAlive" = true;
"datasource.showURL" = false;
"rule" = [
"http://<some-server-addr>/path/to/rules"
"dir/*.yaml"
];
};
description = ''
`vmalert` configuration, passed via command line flags. Refer to
<https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/README.md#configuration>
for details on supported values.
'';
};
rules = mkOption {
type = format.type;
default = { };
example = {
group = [
{
name = "TestGroup";
rules = [
{
alert = "ExampleAlertAlwaysFiring";
expr = ''
sum by(job)
(up == 1)
'';
}
config = {
settings.rule = [
"/etc/${vmalertName name}/rules.yml"
];
}
];
};
description = ''
A list of the given alerting or recording rules against configured `"datasource.url"` compatible with
Prometheus HTTP API for `vmalert` to execute. Refer to
<https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/README.md#rules>
for details on supported values.
'';
};
};
}
)
);
};
# implementation
config = mkIf cfg.enable {
config = mkIf (enabledInstances != { }) {
environment.etc = lib.mapAttrs' (
name:
{ rules, ... }:
lib.nameValuePair "${vmalertName name}/rules.yml" {
source = format.generate "rules.yml" rules;
}
) enabledInstances;
environment.etc."vmalert/rules.yml".source = format.generate "rules.yml" cfg.rules;
systemd.services = lib.mapAttrs' (
name:
{ settings, ... }:
let
name' = vmalertName name;
in
lib.nameValuePair name' {
description = "vmalert service";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
reloadTriggers = [ config.environment.etc."${name'}/rules.yml".source ];
services.vmalert.settings.rule = [
"/etc/vmalert/rules.yml"
];
systemd.services.vmalert = {
description = "vmalert service";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
reloadTriggers = [ config.environment.etc."vmalert/rules.yml".source ];
serviceConfig = {
DynamicUser = true;
Restart = "on-failure";
ExecStart = "${cfg.package}/bin/vmalert ${confOpts}";
ExecReload = ''${pkgs.coreutils}/bin/kill -SIGHUP "$MAINPID"'';
};
};
serviceConfig = {
DynamicUser = true;
Restart = "on-failure";
ExecStart = "${cfg.package}/bin/vmalert ${mkConfOpts settings}";
ExecReload = ''${pkgs.coreutils}/bin/kill -SIGHUP "$MAINPID"'';
};
}
) enabledInstances;
};
}
+1 -1
View File
@@ -55,7 +55,7 @@ import ../make-test-python.nix (
};
};
services.vmalert = {
services.vmalert.instances."" = {
enable = true;
settings = {
"datasource.url" = "http://localhost:8428"; # victoriametrics' api
@@ -15133,6 +15133,19 @@ final: prev: {
meta.hydraPlatforms = [ ];
};
ts-autotag-nvim = buildVimPlugin {
pname = "ts-autotag.nvim";
version = "2025-01-15";
src = fetchFromGitHub {
owner = "tronikelis";
repo = "ts-autotag.nvim";
rev = "0f1dc38fddd99b468ef58938d7cd99ce1d6bcb0e";
sha256 = "1m0gng9v5dn6mm026nxw0n24bvysr156xhwvf83pv9xqp28xfwar";
};
meta.homepage = "https://github.com/tronikelis/ts-autotag.nvim/";
meta.hydraPlatforms = [ ];
};
ts-comments-nvim = buildVimPlugin {
pname = "ts-comments.nvim";
version = "2025-02-27";
@@ -1161,6 +1161,7 @@ https://github.com/simonmclean/triptych.nvim/,HEAD,
https://github.com/folke/trouble.nvim/,,
https://github.com/Pocco81/true-zen.nvim/,,
https://github.com/tesaguri/trust.vim/,HEAD,
https://github.com/tronikelis/ts-autotag.nvim/,HEAD,
https://github.com/folke/ts-comments.nvim/,HEAD,
https://github.com/dmmulroy/tsc.nvim/,HEAD,
https://github.com/jgdavey/tslime.vim/,,
@@ -0,0 +1,44 @@
{
lib,
buildLua,
fetchFromGitHub,
unstableGitUpdater,
}:
buildLua {
pname = "easycrop";
version = "0-unstable-2018-01-24";
src = fetchFromGitHub {
owner = "aidanholm";
repo = "mpv-easycrop";
rev = "b8a67bb9039e19dec54d92ea57076c0c98e981aa";
hash = "sha256-VRQP8j/Z/OvVqrEpvWcLmJFotxbTRynHoqvfIQIQmqY=";
};
scriptPath = "easycrop.lua";
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Manually crop videos during playback in mpv";
longDescription = ''
A simple mpv script for manually cropping videos with ease.
- Works during video playback
- No need to re-encode or modify video files
Press "c" to begin cropping. Click at one corner of the desired
cropping rectangle, and click a second time at the opposite
corner; the video will be cropped immediately. Pressing "c" again
will undo the current crop.
If you wish to use a key other than "c" to crop, the keybind
`easy_crop` can be changed.
'';
homepage = "https://github.com/aidanholm/mpv-easycrop";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ RossSmyth ];
};
}
+41
View File
@@ -0,0 +1,41 @@
{
lib,
stdenvNoCC,
fetchzip,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "biz-ud-gothic";
version = "1.051";
src = fetchzip {
# Sticking with this assets file due to ongoing discussions.
# We may switch to a different asset once the issue is resolved or clarifications are provided.
# ref: https://github.com/googlefonts/morisawa-biz-ud-gothic/issues/47
url = "https://github.com/googlefonts/morisawa-biz-ud-gothic/releases/download/v${finalAttrs.version}/morisawa-biz-ud-gothic-fonts.zip";
hash = "sha256-7PlIrQX1fnFHXm7mjfoOCVp3GSnLT2GlVZdSoZbh/s4=";
};
installPhase = ''
runHook preInstall
install -Dm444 fonts/ttf/*.ttf -t "$out/share/fonts/truetype/"
runHook postInstall
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Universal Design Japanese font";
homepage = "https://github.com/googlefonts/morisawa-biz-ud-gothic";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [
kachick
];
platforms = lib.platforms.all;
};
})
+69 -69
View File
@@ -14,28 +14,28 @@
"jar": "sha256-CV/R3HeIjAc/C+OaAYFW7lJnInmLCd6eKF7yE14W6sQ=",
"pom": "sha256-NQkZQkMk4nUKPdwvobzmqQrIziklaYpgqbTR1uSSL/4="
},
"com/diffplug/durian#durian-swt.os/4.2.2": {
"jar": "sha256-a1Mca0vlgaizLq2GHdwVwsk7IMZl+00z4DgUg8JERfQ=",
"module": "sha256-rVlQLGknZu48M0vkliigDctNka4aSPJjLitxUStDXPk=",
"pom": "sha256-GzxJFP1eLM4pZq1wdWY5ZBFFwdNCB3CTV4Py3yY2kIU="
"com/diffplug/durian#durian-swt.os/4.3.0": {
"jar": "sha256-geK2Oafkvm3JtyRXE88G9cq1HynbLha5tXZFyW/eKIQ=",
"module": "sha256-IFNqlfL+sr9DBRKMaq7Lb9idxFeYqchfJgK4qAnXUNs=",
"pom": "sha256-Q1z/VXiZht7arXF/aPuo1UgklHhWLc2EsirU1lZvRAs="
},
"com/diffplug/spotless#com.diffplug.spotless.gradle.plugin/6.25.0": {
"pom": "sha256-9FyCsS+qzYWs1HTrppkyL6XeqIQIskfQ5L3pQSkIIjo="
"com/diffplug/spotless#com.diffplug.spotless.gradle.plugin/7.0.2": {
"pom": "sha256-7R3td6KWpv4hpQJ5ySbAe+FK98CMJDfTaFxw/Pa7oC0="
},
"com/diffplug/spotless#spotless-lib-extra/2.45.0": {
"jar": "sha256-YCy7zTgo7pz7LjCn+bMDNcaScTB3FBTUzdKU0h/ly2c=",
"module": "sha256-9pnkNfTlzgPbYJpHaO6wNj1uB8ZfvPrx/GKcTnbuf7A=",
"pom": "sha256-5x2LkRDdSNLn9KVLi/uozlWpbmteu9T0OpJGZJz1b7A="
"com/diffplug/spotless#spotless-lib-extra/3.0.2": {
"jar": "sha256-sOd3RtYz1EXnhImsPQitLqGzU3xNBk5KvkbMQtYjA+s=",
"module": "sha256-vSVeQkQbWRehU8U9z5fP08IEevN2zF3Yu1Z/aEAWtFk=",
"pom": "sha256-IVesGayscKzQRQH8WbvJZNsZD1tx5O1e/s6o5c9o7Os="
},
"com/diffplug/spotless#spotless-lib/2.45.0": {
"jar": "sha256-sllply4dmAKAyirlKRl+2bMWCq5ItQbPGTXwG9Exhmc=",
"module": "sha256-+x+8+TUAczrHWcp99E8P9mVTEze0LaAS4on/CINNiQ8=",
"pom": "sha256-WKd8IsQLIc8m29tCEwFu9HrM9bBwchfHkyqQ9D+PMNw="
"com/diffplug/spotless#spotless-lib/3.0.2": {
"jar": "sha256-P5p/38WwOsIIlINBcJEMFcTyuE7UzjZ3iYowetWJg3w=",
"module": "sha256-E1WLrsCR6gDxYmXNNSOBePT+ejv61zXel214XUF/ss0=",
"pom": "sha256-jxtFo4m6Jeel8DvZ8KS9BKp+dHXgku6C1VUJYrLPdV8="
},
"com/diffplug/spotless#spotless-plugin-gradle/6.25.0": {
"jar": "sha256-9euQikxdpGKZ51Q/qtoEAtLEt31Yx7Qy1Lblk0mygKM=",
"module": "sha256-RoHRe/PJIF2DeOynBcAAywzJjcx40DATy2iJjGvSx0Q=",
"pom": "sha256-q1ZuPYS2w/rHqPySXy279TzZdZywOvPAfQ3EN9OXqNo="
"com/diffplug/spotless#spotless-plugin-gradle/7.0.2": {
"jar": "sha256-WaNMT4SkjUyNkp4viZBjaeZUduwEmaQ96Hw+QSeXfNU=",
"module": "sha256-rxC8mydsNqlNcRh+kVhwJ1yyRVZTntzqGYpYL30Tsws=",
"pom": "sha256-JyVoPfbvTNSIr+sgANqJIpQcqQ513D49uFIupxWKaMQ="
},
"com/googlecode/concurrent-trees#concurrent-trees/2.6.1": {
"jar": "sha256-BONySYTipcv1VgbPo3KlvT08XSohUzpwBOPN5Tl2H6U=",
@@ -59,31 +59,31 @@
"module": "sha256-akesUDZOZZhFlAH7hvm2z832N7mzowRbHMM8v0xAghg=",
"pom": "sha256-rrO3CiTBA+0MVFQfNfXFEdJ85gyuN2pZbX1lNpf4zJU="
},
"commons-codec#commons-codec/1.16.0": {
"jar": "sha256-VllfsgsLhbyR0NUD2tULt/G5r8Du1d/6bLslkpAASE0=",
"pom": "sha256-bLWVeBnfOTlW/TEaOgw/XuwevEm6Wy0J8/ROYWf6PnQ="
"commons-codec#commons-codec/1.17.0": {
"jar": "sha256-9wDegKwnDQNE/ep0aCAdi5yAXlxkgzHDYZ8u4GfM/Fk=",
"pom": "sha256-wBxM2l5Aj0HtHYPkoKFwz1OAG2M4q6SfD5BHhrwSFPw="
},
"dev/equo/ide#solstice/1.7.5": {
"jar": "sha256-BuFLxDrMMx2ra16iAfxnNk7RI/mCyF+lEx8IF+1lrk8=",
"module": "sha256-eYp7cGdyE27iijLt2GOx6fgWE6NJhAXXS+ilyb6/9U8=",
"pom": "sha256-20U7urXn2opDE5sNzTuuZykzIfKcTZH1p5XZ/2xS3d8="
"dev/equo/ide#solstice/1.8.1": {
"jar": "sha256-bluizOgTvh1xzNwuzz5JJxsU5pG/u7GhFM86MOdzsQ0=",
"module": "sha256-pnYDnqavCPJXtG4Hwr8VcaRqTUtbnMuGw/yY0H+v6hs=",
"pom": "sha256-arSo7K4qu9NrkZ0Lm5+yTBdxSPE+U2TJegxu4Ro/xCY="
},
"org/apache#apache/29": {
"pom": "sha256-PkkDcXSCC70N9jQgqXclWIY5iVTCoGKR+mH3J6w1s3c="
"org/apache#apache/31": {
"pom": "sha256-VV0MnqppwEKv+SSSe5OB6PgXQTbTVe6tRFIkRS5ikcw="
},
"org/apache/commons#commons-parent/58": {
"pom": "sha256-LUsS4YiZBjq9fHUni1+pejcp2Ah4zuy2pA2UbpwNVZA="
"org/apache/commons#commons-parent/69": {
"pom": "sha256-1Q2pw5vcqCPWGNG0oDtz8ZZJf8uGFv0NpyfIYjWSqbs="
},
"org/eclipse/jgit#org.eclipse.jgit-parent/6.7.0.202309050840-r": {
"pom": "sha256-u56FQW2Y0HMfx2f41w6EaAQWAdZnKuItsqx5n3qjkR8="
"org/eclipse/jgit#org.eclipse.jgit-parent/6.10.0.202406032230-r": {
"pom": "sha256-8tNTmgp5Iv15RwgsGQHSCQ2uB0mGsi2r2XO0OYzR6i4="
},
"org/eclipse/jgit#org.eclipse.jgit/6.7.0.202309050840-r": {
"jar": "sha256-tWRHfQkiQaqrUMhKxd0aw3XAGCBE1+VlnTpgqQ4ugBo=",
"pom": "sha256-BNB83b8ZjfpuRIuan7lA94HAEq2T2eqCBv4KTTplwZI="
"org/eclipse/jgit#org.eclipse.jgit/6.10.0.202406032230-r": {
"jar": "sha256-Q/kvOttoGl8wBrl56NNBwSqM/YAp8ofEK88KgDd1Za4=",
"pom": "sha256-BVlUQr62ogYQi2c6qcZpLIPkHfGDF33GcROxzD9Sgd0="
},
"org/eclipse/platform#org.eclipse.osgi/3.18.300": {
"jar": "sha256-urlD5Y7dFzCSOGctunpFrsni2svd24GKjPF3I+oT+iI=",
"pom": "sha256-4nl2N1mZxUJ/y8//PzvCD77a+tiqRRArN59cL5fI/rQ="
"org/eclipse/platform#org.eclipse.osgi/3.18.500": {
"jar": "sha256-gLJ11YN5cjspHqZQJJzDgJyPELNPeKr5iBMs1tQ0q04=",
"pom": "sha256-4o9b4Azk7Sx+SAnsrQW5UwfzWhflhWAHhri97juk2Wg="
},
"org/jetbrains#annotations/13.0": {
"jar": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg=",
@@ -114,9 +114,9 @@
"jar": "sha256-VemJxRK4CQd5n4VDCfO8d4LFs9E5MkQtA3nVxHJxFQQ=",
"pom": "sha256-fin79z/fceBnnT3ufmgP1XNGT6AWRKT1irgZ0sCI09I="
},
"org/junit#junit-bom/5.9.3": {
"module": "sha256-tAH9JZAeWCpSSqU0PEs54ovFbiSWHBBpvytLv87ka5M=",
"pom": "sha256-TQMpzZ5y8kIOXKFXJMv+b/puX9KIg2FRYnEZD9w0Ltc="
"org/junit#junit-bom/5.10.2": {
"module": "sha256-3iOxFLPkEZqP5usXvtWjhSgWaYus5nBxV51tkn67CAo=",
"pom": "sha256-Fp3ZBKSw9lIM/+ZYzGIpK/6fPBSpifqSEgckzeQ6mWg="
},
"org/slf4j#slf4j-api/1.7.36": {
"jar": "sha256-0+9XXj5JeWeNwBvx3M5RAhSTtNEft/G+itmCh3wWocA=",
@@ -137,31 +137,31 @@
}
},
"https://repo.maven.apache.org/maven2": {
"com/google/code/gson#gson-parent/2.11.0": {
"pom": "sha256-issfO3Km8CaRasBzW62aqwKT1Sftt7NlMn3vE6k2e3o="
"com/google/code/gson#gson-parent/2.12.1": {
"pom": "sha256-yeewt+Mb574iaEl5wGgAHGUssRPE5u2JTjm2Q97gf8E="
},
"com/google/code/gson#gson/2.11.0": {
"jar": "sha256-V5KNblpu3rKr03cKj5W6RNzkXzsjt6ncKzCcWBVSp4s=",
"pom": "sha256-wOVHvqmYiI5uJcWIapDnYicryItSdTQ90sBd7Wyi42A="
"com/google/code/gson#gson/2.12.1": {
"jar": "sha256-6+4T1ft0d81/HMAQ4MNW34yoBwlxUkjal/eeNcy0++w=",
"pom": "sha256-C1c17IX0UoLx4sdpd5gAQnsVCoFj9AUJOpKAtxyrGXg="
},
"com/google/errorprone#error_prone_annotations/2.27.0": {
"jar": "sha256-JMkjNyxY410LnxagKJKbua7cd1IYZ8J08r0HNd9bofU=",
"pom": "sha256-TKWjXWEjXhZUmsNG0eNFUc3w/ifoSqV+A8vrJV6k5do="
"com/google/errorprone#error_prone_annotations/2.36.0": {
"jar": "sha256-d0QOJwsLyaJJkDxaB2w2pyLEiGyk9CZ18pA6HFPtYaU=",
"pom": "sha256-15z9N8hfdta3VMdQHuHchEe3smQsI4LXeCUhZr0zHpw="
},
"com/google/errorprone#error_prone_parent/2.27.0": {
"pom": "sha256-+oGCnQSVWd9pJ/nJpv1rvQn4tQ5tRzaucsgwC2w9dlQ="
"com/google/errorprone#error_prone_parent/2.36.0": {
"pom": "sha256-Okz8imvtYetI6Wl5b8MeoNJwtj5nBZmUamGIOttwlNw="
},
"commons-io#commons-io/2.18.0": {
"jar": "sha256-88oPjWPEDiOlbVQQHGDV7e4Ta0LYS/uFvHljCTEJz4s=",
"pom": "sha256-Y9lpQetE35yQ0q2yrYw/aZwuBl5wcEXF2vcT/KUrz8o="
},
"commons-logging#commons-logging/1.3.3": {
"jar": "sha256-WCj5bAnYhvmxoJk8eASyfPT87IU0UXFk9RN6yLZ+qbk=",
"pom": "sha256-El1hQurD93REC6cCwF8o+eCYxS0QcSrhFJast3EGs7o="
"commons-logging#commons-logging/1.3.4": {
"jar": "sha256-vC3+MvHvBlCeagZRRMGt97Qg6r8RqH8wvRJ/j6ozIBY=",
"pom": "sha256-1L2jSJKqzL9PrTP8MjqKqQfvnXmYRlnaJJRMCoa/CGU="
},
"net/java/dev/jna#jna/5.15.0": {
"jar": "sha256-pWQVjSirUSf8apWAKO1UJ5/gmZZixGQltqOwmipSCU0=",
"pom": "sha256-J2YC/zZ6TDkVXa7MHoy1T0eJ5dgN+Qo6i2YD8d61ngU="
"net/java/dev/jna#jna/5.17.0": {
"jar": "sha256-s6lAjnxR4I7w47/MCPRD9uwPYZG6jNfBjVPSsi5b28A=",
"pom": "sha256-UBoP8F2EpK0Q9t4lvpT0k5i3CjG+jzoO2fTGtE++/uQ="
},
"org/apache#apache/32": {
"pom": "sha256-z9hywOwn9Trmj0PbwP7N7YrddzB5pTr705DkB7Qs5y8="
@@ -169,26 +169,26 @@
"org/apache#apache/33": {
"pom": "sha256-14vYUkxfg4ChkKZSVoZimpXf5RLfIRETg6bYwJI6RBU="
},
"org/apache/commons#commons-parent/71": {
"pom": "sha256-lbe+cPMWrkyiL2+90I3iGC6HzYdKZQ3nw9M4anR6gqM="
"org/apache/commons#commons-parent/72": {
"pom": "sha256-Q0Xev8dnsa6saKvdcvxn0YtSHUs5A3KhG2P/DFhrIyA="
},
"org/apache/commons#commons-parent/78": {
"pom": "sha256-Ai0gLmVe3QTyoQ7L5FPZKXeSTTg4Ckyow1nxgXqAMg4="
},
"org/apache/pdfbox#fontbox/3.0.3": {
"jar": "sha256-ZWkMPzmwShTRLBf0mYwVGGzod9Pi7CIscIV348wCgDA=",
"pom": "sha256-sik+UDqncEMGEVD4hGg9f2FMz1Fjvi0PBSyinzx2d+I="
"org/apache/pdfbox#fontbox/3.0.4": {
"jar": "sha256-Le7GIy9dbTsxJ2WS0xaArpcir1fSTLD3bacOK6DpnhI=",
"pom": "sha256-8MzDMOmyDYlXigqHArR6OZvNYojCOG10/6uPjjAoROg="
},
"org/apache/pdfbox#pdfbox-io/3.0.3": {
"jar": "sha256-Ej6jGHtJfFTmYdUMPIZ0eb93Zo/0UOUHEMZY8rtGh7o=",
"pom": "sha256-EXAbuMWnNaSzFA9zroM6KBzqCeO8P583kbmpenRekNQ="
"org/apache/pdfbox#pdfbox-io/3.0.4": {
"jar": "sha256-ep1HRvLhOh4i9O/kf7r5mXY8rqQXSFNa+ToB7txQ9VQ=",
"pom": "sha256-YLURdX737TBIv4LH2ClvcdC8RwAgEYQzqzs+OEC/jqU="
},
"org/apache/pdfbox#pdfbox-parent/3.0.3": {
"pom": "sha256-yGXhzv8Jq1Kwh+cmDE8V025bW4vk/+IERvqkCiygvcw="
"org/apache/pdfbox#pdfbox-parent/3.0.4": {
"pom": "sha256-w5j++zUez/mTEYCNftU0bnHzVrETS9c6JQTLgXB9tFE="
},
"org/apache/pdfbox#pdfbox/3.0.3": {
"jar": "sha256-W+ONLsgWkbBdU163IN5NxWbF0H5aBHMfoAZo0VOotKY=",
"pom": "sha256-vgiV9rLCDzEdYjXJam/SqsECsxkE0/TDnqUll3WwcAg="
"org/apache/pdfbox#pdfbox/3.0.4": {
"jar": "sha256-CaD/J9b4Sh3EAGDLCgHezyrU75HDa8kbmDbCVL6KrkU=",
"pom": "sha256-098DLfK90jT+NwMO+sNXa6Yj/Jf1ERNUxMUq13dfkOQ="
},
"org/junit#junit-bom/5.11.0-M2": {
"module": "sha256-hkd6vPSQ1soFmqmXPLEI0ipQb0nRpVabsyzGy/Q8LM4=",
@@ -21,13 +21,13 @@
let
pname = "cie-middleware-linux";
version = "1.5.6";
version = "1.5.9";
src = fetchFromGitHub {
owner = "M0rf30";
repo = "cie-middleware-linux";
rev = version;
sha256 = "sha256-2P/1hQTmeQ6qE7RgAeLOZTszcLcIpa2XX1S2ahXRHcc=";
hash = "sha256-2UMKxanF35oBNBtIqfU46QUYJwXiTU1xCrCMqzqetgI=";
};
gradle = gradle_8;
@@ -61,8 +61,6 @@ stdenv.mkDerivation {
libxml2
];
patches = [ ./use-system-podofo.patch ];
postPatch = ''
# substitute the cieid command with this $out/bin/cieid
substituteInPlace libs/pkcs11/src/CSP/AbilitaCIE.cpp \
@@ -114,6 +112,7 @@ stdenv.mkDerivation {
popd
# Install the Java application
ls cie-java/build/libs/CIEID-standalone.jar
install -Dm755 cie-java/build/libs/CIEID-standalone.jar \
"$out/share/cieid/cieid.jar"
@@ -123,11 +122,11 @@ stdenv.mkDerivation {
--add-flags "-Djna.library.path='$out/lib:${libraries}'" \
--add-flags '-Dawt.useSystemAAFontSettings=on' \
--add-flags "-cp $out/share/cieid/cieid.jar" \
--add-flags "it.ipzs.cieid.MainApplication"
--add-flags "app.m0rf30.cieid.MainApplication"
# Install other files
install -Dm644 data/cieid.desktop "$out/share/applications/cieid.desktop"
install -Dm755 data/logo.png "$out/share/pixmaps/cieid.png"
install -Dm644 data/app.m0rf30.cieid.desktop -t "$out/share/applications"
install -Dm755 data/app.m0rf30.cieid.svg -t "$out/share/pixmaps"
install -Dm644 LICENSE "$out/share/licenses/cieid/LICENSE"
'';
@@ -146,8 +145,6 @@ stdenv.mkDerivation {
'';
license = licenses.bsd3;
platforms = platforms.unix;
# Note: fails due to a lot of broken type conversions
badPlatforms = platforms.darwin;
maintainers = with maintainers; [ rnhmjoj ];
};
}
@@ -1,343 +0,0 @@
commit c9ac4243a6def08790bbf5552bb31894169596ca
Author: rnhmjoj <rnhmjoj@inventati.org>
Date: Wed Apr 3 12:54:58 2024 +0200
use system podofo
diff --git a/libs/meson.build b/libs/meson.build
index 3ee31c1..5022ba8 100644
--- a/libs/meson.build
+++ b/libs/meson.build
@@ -16,21 +16,15 @@ curl_dep = dependency('libcurl')
fontconfig_dep = dependency('fontconfig')
freetype_dep = dependency('freetype2')
png_dep = dependency('libpng')
-podofo_dep = cpp.find_library('libpodofo', dirs: libdir)
+podofo_dep = dependency('libpodofo')
libxml2_dep = dependency('libxml-2.0', required: false)
xml2_dep = dependency('xml2', required: false)
zlib_dep = dependency('zlib')
inc_so = include_directories('pkcs11/src/.', 'shared/src/')
-inc_a = include_directories(
- 'sign-sdk/include',
- 'sign-sdk/include/podofo',
- 'sign-sdk/include/podofo/include',
- 'sign-sdk/include/podofo/include/podofo',
- 'sign-sdk/src',
- 'shared/src/',
-)
+inc_a = include_directories('sign-sdk/include', 'sign-sdk/src', 'shared/src/')
+
cie_pkcs11_sources = [
'shared/src/Util/log.cpp',
'shared/src/Util/funccallinfo.cpp',
diff --git a/libs/sign-sdk/include/PdfSignatureGenerator.h b/libs/sign-sdk/include/PdfSignatureGenerator.h
index 93ab445..65d438f 100644
--- a/libs/sign-sdk/include/PdfSignatureGenerator.h
+++ b/libs/sign-sdk/include/PdfSignatureGenerator.h
@@ -10,9 +10,7 @@
#ifndef _PDFSIGNATUREGENERATOR_H_
#define _PDFSIGNATUREGENERATOR_H_
#include "Util/UUCByteArray.h"
-#include "podofo/doc/PdfSignOutputDevice.h"
-#include "podofo/doc/PdfSignatureField.h"
-#include "podofo/podofo.h"
+#include <podofo/podofo.h>
using namespace PoDoFo;
using namespace std;
@@ -60,7 +58,11 @@ class PdfSignatureGenerator {
const double getHeight(int pageIndex);
private:
- PdfMemDocument* m_pPdfDocument;
+ PdfDocument* m_pPdfDocument;
+
+ PdfMemDocument* m_pPdfMemDocument;
+
+ PdfWriter* m_pPdfWriter;
PdfSignatureField* m_pSignatureField;
diff --git a/libs/sign-sdk/src/PdfSignatureGenerator.cpp b/libs/sign-sdk/src/PdfSignatureGenerator.cpp
index 44ef54a..e8b8c8e 100644
--- a/libs/sign-sdk/src/PdfSignatureGenerator.cpp
+++ b/libs/sign-sdk/src/PdfSignatureGenerator.cpp
@@ -27,7 +27,7 @@ int GetNumberOfSignatures(PdfMemDocument* pPdfDocument);
USE_LOG;
PdfSignatureGenerator::PdfSignatureGenerator()
- : m_pPdfDocument(NULL),
+ : m_pPdfMemDocument(NULL),
m_pSignatureField(NULL),
m_pSignOutputDevice(NULL),
m_pFinalOutDevice(NULL),
@@ -37,7 +37,7 @@ PdfSignatureGenerator::PdfSignatureGenerator()
}
PdfSignatureGenerator::~PdfSignatureGenerator() {
- if (m_pPdfDocument) delete m_pPdfDocument;
+ if (m_pPdfMemDocument) delete m_pPdfMemDocument;
if (m_pSignatureField) delete m_pSignatureField;
@@ -51,21 +51,21 @@ PdfSignatureGenerator::~PdfSignatureGenerator() {
}
int PdfSignatureGenerator::Load(const char* pdf, int len) {
- if (m_pPdfDocument) delete m_pPdfDocument;
+ if (m_pPdfMemDocument) delete m_pPdfMemDocument;
try {
printf("PDF LENGTH");
printf("%i", len);
printf("STOP");
- m_pPdfDocument = new PdfMemDocument();
- m_pPdfDocument->Load(pdf, len);
- printf("OK m_pPdfDocument");
- int nSigns = PDFVerifier::GetNumberOfSignatures(m_pPdfDocument);
+ m_pPdfMemDocument = new PdfMemDocument();
+ m_pPdfMemDocument->Load(pdf);
+ printf("OK m_pPdfMemDocument");
+ int nSigns = PDFVerifier::GetNumberOfSignatures(m_pPdfMemDocument);
printf("OK nSigns: %d", nSigns);
if (nSigns > 0) {
- m_pPdfDocument->SetIncrementalUpdates(true);
+ m_pPdfWriter->PdfWriter::SetIncrementalUpdate(true);
}
m_actualLen = len;
@@ -82,14 +82,8 @@ void PdfSignatureGenerator::AddFont(const char* szFontName,
// printf(szFontName);
// printf(szFontPath);
- m_pPdfDocument->CreateFont(
- szFontName, false, false,
- PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
- PdfFontCache::eFontCreationFlags_AutoSelectBase14, true, szFontPath);
- m_pPdfDocument->CreateFont(
- szFontName, true, false,
- PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
- PdfFontCache::eFontCreationFlags_AutoSelectBase14, true, szFontPath);
+ m_pPdfDocument->PoDoFo::PdfDocument::CreateFont( szFontName, false, PdfEncodingFactory::GlobalWinAnsiEncodingInstance(), PdfFontCache::eFontCreationFlags_AutoSelectBase14, true);
+ m_pPdfDocument->PoDoFo::PdfDocument::CreateFont( szFontName, true, PdfEncodingFactory::GlobalWinAnsiEncodingInstance(), PdfFontCache::eFontCreationFlags_AutoSelectBase14, true);
}
void PdfSignatureGenerator::InitSignature(
@@ -130,7 +124,7 @@ void PdfSignatureGenerator::InitSignature(
if (m_pSignatureField) delete m_pSignatureField;
- PdfPage* pPage = m_pPdfDocument->GetPage(pageIndex);
+ PdfPage* pPage = m_pPdfMemDocument->GetPage(pageIndex);
PdfRect cropBox = pPage->GetCropBox();
float left0 = left * cropBox.GetWidth();
@@ -145,15 +139,14 @@ void PdfSignatureGenerator::InitSignature(
LOG_DBG((0, "InitSignature", "PdfSignatureField"));
- m_pSignatureField = new PdfSignatureField(
- pPage, rect, m_pPdfDocument, PdfString(szFieldName), szSubFilter);
+ m_pSignatureField = new PdfSignatureField(pPage, rect, m_pPdfMemDocument);
LOG_DBG((0, "InitSignature", "PdfSignatureField OK"));
if (szReason && szReason[0]) {
PdfString reason(szReason);
PdfString reasonLabel(szReasonLabel);
- m_pSignatureField->SetSignatureReason(reasonLabel, reason);
+ m_pSignatureField->SetSignatureReason(reason);
}
LOG_DBG((0, "InitSignature", "szReason OK"));
@@ -161,7 +154,7 @@ void PdfSignatureGenerator::InitSignature(
if (szLocation && szLocation[0]) {
PdfString location(szLocation);
PdfString locationLabel(szLocationLabel);
- m_pSignatureField->SetSignatureLocation(locationLabel, location);
+ m_pSignatureField->SetSignatureLocation(location);
}
LOG_DBG((0, "InitSignature", "szLocation OK"));
@@ -171,54 +164,42 @@ void PdfSignatureGenerator::InitSignature(
LOG_DBG((0, "InitSignature", "Date OK"));
- if (szName && szName[0]) {
- PdfString name(szName);
- PdfString nameLabel(szNameLabel);
- m_pSignatureField->SetSignatureName(nameLabel, name);
- }
-
- LOG_DBG((0, "InitSignature", "szName OK"));
-
- m_pSignatureField->SetSignatureSize(SIGNATURE_SIZE);
+ m_pSignOutputDevice->PdfSignOutputDevice::SetSignatureSize(SIGNATURE_SIZE);
LOG_DBG((0, "InitSignature", "SIGNATURE_SIZE OK"));
- // if((szImagePath && szImagePath[0]) || (szDescription && szDescription[0]))
- if (width * height > 0) {
- try {
- // m_pSignatureField->SetFontSize(5);
- m_pSignatureField->SetAppearance(szImagePath, szDescription);
- LOG_DBG((0, "InitSignature", "SetAppearance OK"));
- } catch (PdfError& error) {
- LOG_ERR((0, "InitSignature", "SetAppearance error: %s, %s",
- PdfError::ErrorMessage(error.GetError()), error.what()));
- } catch (PdfError* perror) {
- LOG_ERR((0, "InitSignature", "SetAppearance error2: %s, %s",
- PdfError::ErrorMessage(perror->GetError()), perror->what()));
- } catch (std::exception& ex) {
- LOG_ERR(
- (0, "InitSignature", "SetAppearance std exception, %s", ex.what()));
- } catch (std::exception* pex) {
- LOG_ERR((0, "InitSignature", "SetAppearance std exception2, %s",
- pex->what()));
- } catch (...) {
- LOG_ERR((0, "InitSignature", "SetAppearance unknown error"));
- }
- }
+ // if (width * height > 0) {
+ // try {
+ // m_pSignatureField->SetAppearance(szImagePath, szDescription);
+ // LOG_DBG((0, "InitSignature", "SetAppearance OK"));
+ // } catch (PdfError& error) {
+ // LOG_ERR((0, "InitSignature", "SetAppearance error: %s, %s",
+ // PdfError::ErrorMessage(error.GetError()), error.what()));
+ // } catch (PdfError* perror) {
+ // LOG_ERR((0, "InitSignature", "SetAppearance error2: %s, %s",
+ // PdfError::ErrorMessage(perror->GetError()), perror->what()));
+ // } catch (std::exception& ex) {
+ // LOG_ERR(
+ // (0, "InitSignature", "SetAppearance std exception, %s",
+ // ex.what()));
+ // } catch (std::exception* pex) {
+ // LOG_ERR((0, "InitSignature", "SetAppearance std exception2, %s",
+ // pex->what()));
+ // } catch (...) {
+ // LOG_ERR((0, "InitSignature", "SetAppearance unknown error"));
+ // }
+ // }
- if (szGraphometricData && szGraphometricData[0])
- m_pSignatureField->SetGraphometricData(
- PdfString("Aruba_Sign_Biometric_Data"), PdfString(szGraphometricData),
- PdfString(szVersion));
+ // if (szGraphometricData && szGraphometricData[0])
+ // m_pSignatureField->SetGraphometricData(
+ // PdfString("Aruba_Sign_Biometric_Data"),
+ // PdfString(szGraphometricData), PdfString(szVersion));
- LOG_DBG((0, "InitSignature", "szGraphometricData OK"));
+ // LOG_DBG((0, "InitSignature", "szGraphometricData OK"));
LOG_DBG((0, "InitSignature", "m_actualLen %d", m_actualLen));
// crea il nuovo doc con il campo di firma
- int fulllen = m_actualLen * 2 + SIGNATURE_SIZE * 2 +
- (szGraphometricData
- ? (strlen(szGraphometricData) + strlen(szVersion) + 100)
- : 0);
+ int fulllen = m_actualLen * 2 + SIGNATURE_SIZE * 2;
int mainDoclen = 0;
m_pMainDocbuffer = NULL;
@@ -227,7 +208,7 @@ void PdfSignatureGenerator::InitSignature(
LOG_DBG((0, "InitSignature", "fulllen %d", fulllen));
m_pMainDocbuffer = new char[fulllen];
PdfOutputDevice pdfOutDevice(m_pMainDocbuffer, fulllen);
- m_pPdfDocument->Write(&pdfOutDevice);
+ m_pPdfMemDocument->Write(&pdfOutDevice);
mainDoclen = pdfOutDevice.GetLength();
} catch (::PoDoFo::PdfError err) {
if (m_pMainDocbuffer) {
@@ -301,32 +282,32 @@ void PdfSignatureGenerator::GetSignedPdf(UUCByteArray& signedPdf) {
}
const double PdfSignatureGenerator::getWidth(int pageIndex) {
- if (m_pPdfDocument) {
- PdfPage* pPage = m_pPdfDocument->GetPage(pageIndex);
+ if (m_pPdfMemDocument) {
+ PdfPage* pPage = m_pPdfMemDocument->GetPage(pageIndex);
return pPage->GetPageSize().GetWidth();
}
return 0;
}
const double PdfSignatureGenerator::getHeight(int pageIndex) {
- if (m_pPdfDocument) {
- PdfPage* pPage = m_pPdfDocument->GetPage(pageIndex);
+ if (m_pPdfMemDocument) {
+ PdfPage* pPage = m_pPdfMemDocument->GetPage(pageIndex);
return pPage->GetPageSize().GetHeight();
}
return 0;
}
const double PdfSignatureGenerator::lastSignatureY(int left, int bottom) {
- if (!m_pPdfDocument) return -1;
+ if (!m_pPdfMemDocument) return -1;
/// Find the document catalog dictionary
- const PdfObject* const trailer = m_pPdfDocument->GetTrailer();
+ const PdfObject* const trailer = m_pPdfMemDocument->GetTrailer();
if (!trailer->IsDictionary()) return -1;
const PdfObject* const catalogRef =
trailer->GetDictionary().GetKey(PdfName("Root"));
if (catalogRef == 0 || !catalogRef->IsReference())
return -2; // throw std::invalid_argument("Invalid /Root entry");
const PdfObject* const catalog =
- m_pPdfDocument->GetObjects().GetObject(catalogRef->GetReference());
+ m_pPdfMemDocument->GetObjects().GetObject(catalogRef->GetReference());
if (catalog == 0 || !catalog->IsDictionary())
return -3; // throw std::invalid_argument("Invalid or non-dictionary
// referenced by /Root entry");
@@ -336,8 +317,8 @@ const double PdfSignatureGenerator::lastSignatureY(int left, int bottom) {
catalog->GetDictionary().GetKey(PdfName("AcroForm"));
if (acroFormValue == 0) return bottom;
if (acroFormValue->IsReference())
- acroFormValue =
- m_pPdfDocument->GetObjects().GetObject(acroFormValue->GetReference());
+ acroFormValue = m_pPdfMemDocument->GetObjects().GetObject(
+ acroFormValue->GetReference());
if (!acroFormValue->IsDictionary()) return bottom;
@@ -346,8 +327,8 @@ const double PdfSignatureGenerator::lastSignatureY(int left, int bottom) {
if (fieldsValue == 0) return bottom;
if (fieldsValue->IsReference())
- fieldsValue =
- m_pPdfDocument->GetObjects().GetObject(acroFormValue->GetReference());
+ fieldsValue = m_pPdfMemDocument->GetObjects().GetObject(
+ acroFormValue->GetReference());
if (!fieldsValue->IsArray()) return bottom;
@@ -360,8 +341,8 @@ const double PdfSignatureGenerator::lastSignatureY(int left, int bottom) {
for (unsigned int i = 0; i < array.size(); i++) {
const PdfObject* pObj =
- m_pPdfDocument->GetObjects().GetObject(array[i].GetReference());
- if (IsSignatureField(m_pPdfDocument, pObj)) {
+ m_pPdfMemDocument->GetObjects().GetObject(array[i].GetReference());
+ if (IsSignatureField(m_pPdfMemDocument, pObj)) {
const PdfObject* const keyRect =
pObj->GetDictionary().GetKey(PdfName("Rect"));
if (keyRect == 0) {
diff --git a/libs/sign-sdk/src/disigonsdk.cpp b/libs/sign-sdk/src/disigonsdk.cpp
index 250c93f..84e1b0b 100644
--- a/libs/sign-sdk/src/disigonsdk.cpp
+++ b/libs/sign-sdk/src/disigonsdk.cpp
@@ -5,6 +5,7 @@
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
+#include <podofo/podofo.h>
#include <stdlib.h>
#include <string.h>
+2 -2
View File
@@ -9,14 +9,14 @@
}:
python3.pkgs.buildPythonApplication rec {
pname = "dooit";
version = "3.2.2";
version = "3.2.3";
pyproject = true;
src = fetchFromGitHub {
owner = "dooit-org";
repo = "dooit";
tag = "v${version}";
hash = "sha256-2W3iO4AOuDdDKJDMMY8YKXlI+dQKRI3PQtkdi9J3wZo=";
hash = "sha256-bI9X+2tTLnQwxfsnBmy2vBI3lJ4UX418zOy3oniVKWc=";
};
build-system = with python3.pkgs; [ poetry-core ];
@@ -1,7 +1,7 @@
{
"version" = "1.11.100";
"version" = "1.11.102";
"hashes" = {
"desktopSrcHash" = "sha256-qlKZkBPWcD1eyEetCrIKsSXmodg6DYCmENfY+UT7Khc=";
"desktopYarnHash" = "sha256-wuRAeb4IpA2Ihr3ohaMPvFsaMod4Bg8o9lm8yzStwmk=";
"desktopSrcHash" = "sha256-wefoN8Nk31lwJFYbBRoKfy+0n69yVg6jskqP6aTHApE=";
"desktopYarnHash" = "sha256-/Gy/sYk8EBWU07zXwPl0zsDW5ADRq1j5PH4lPFe8dxk=";
};
}
+24 -9
View File
@@ -4,15 +4,15 @@
fetchFromGitHub,
makeWrapper,
makeDesktopItem,
yarnConfigHook,
yarn,
nodejs,
fetchYarnDeps,
jq,
electron_35,
electron_36,
element-web,
sqlcipher,
callPackage,
desktopToDarwinBundle,
typescript,
useKeytar ? true,
# command line arguments which are always set
commandLineArgs ? "",
@@ -22,7 +22,7 @@ let
pinData = import ./element-desktop-pin.nix;
inherit (pinData.hashes) desktopSrcHash desktopYarnHash;
executableName = "element-desktop";
electron = electron_35;
electron = electron_36;
keytar = callPackage ./keytar {
inherit electron;
};
@@ -41,16 +41,22 @@ stdenv.mkDerivation (
hash = desktopSrcHash;
};
offlineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
sha256 = desktopYarnHash;
# TODO: fetchYarnDeps currently does not deal properly with a dependency
# declared as a pin to a commit in a specific git repository.
# While it does download everything correctly, `yarn install --offline`
# always wants to `git ls-remote` to the repository, ignoring the local
# cached tarball.
offlineCache = callPackage ./yarn.nix {
inherit (finalAttrs) version src;
hash = desktopYarnHash;
};
nativeBuildInputs = [
yarnConfigHook
nodejs
makeWrapper
jq
yarn
typescript
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ];
inherit seshat;
@@ -60,13 +66,21 @@ stdenv.mkDerivation (
# this shouldn't be in the closure just for unused scripts.
dontPatchShebangs = true;
configurePhase = ''
mkdir -p node_modules/
cp -r $offlineCache/node_modules/* node_modules/
substituteInPlace package.json --replace-fail "tsx " "node node_modules/tsx/dist/cli.mjs "
'';
buildPhase = ''
runHook preBuild
yarn --offline run build:ts
yarn --offline run i18n
node node_modules/matrix-web-i18n/scripts/gen-i18n.js
yarn --offline run i18n:sort
yarn --offline run build:res
chmod -R a+w node_modules/keytar-forked
rm -rf node_modules/matrix-seshat node_modules/keytar-forked
${lib.optionalString useKeytar "ln -s ${keytar} node_modules/keytar-forked"}
ln -s $seshat node_modules/matrix-seshat
@@ -82,6 +96,7 @@ stdenv.mkDerivation (
ln -s '${element-web}' "$out/share/element/webapp"
cp -r '.' "$out/share/element/electron"
cp -r './res/img' "$out/share/element"
chmod -R "a+w" "$out/share/element/electron/node_modules"
rm -rf "$out/share/element/electron/node_modules"
cp -r './node_modules' "$out/share/element/electron"
cp $out/share/element/electron/lib/i18n/strings/en_EN.json $out/share/element/electron/lib/i18n/strings/en-us.json
+38
View File
@@ -0,0 +1,38 @@
{
stdenvNoCC,
yarn,
cacert,
git,
version,
src,
hash,
}:
stdenvNoCC.mkDerivation {
pname = "element-desktop-yarn-deps";
inherit version src;
nativeBuildInputs = [
cacert
yarn
git
];
dontInstall = true;
NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildPhase = ''
export HOME=$(mktemp -d)
export YARN_ENABLE_TELEMETRY=0
yarn install --frozen-lockfile --ignore-platform --skip-integrity-check --ignore-scripts --no-progress --non-interactive
mkdir -p $out/node_modules
cp -r node_modules/* $out/node_modules/
'';
dontPatchShebangs = true;
outputHash = hash;
outputHashMode = "recursive";
}
@@ -1,7 +1,7 @@
{
"version" = "1.11.100";
"version" = "1.11.102";
"hashes" = {
"webSrcHash" = "sha256-FiYjWOJ50Vhbs9vgEqK64HTVtwSuy4/BZAkPK4c6DXQ=";
"webYarnHash" = "sha256-C1yVJHU9ClTJHQfMLkdZEeRWVVu68eJp2kxnIlLinY8=";
"webSrcHash" = "sha256-B21fBRcksX8MoyWiqf1sa9yowJ/Z/wcM3vEqslunv7A=";
"webYarnHash" = "sha256-NXoGMEJM4uxFMCb5YX0ue9hgxe22hzG0MTeAOaBrJO4=";
};
}
+3 -3
View File
@@ -31,13 +31,13 @@ let
in
buildGoModule rec {
pname = "frankenphp";
version = "1.6.2";
version = "1.7.0";
src = fetchFromGitHub {
owner = "dunglas";
repo = "frankenphp";
tag = "v${version}";
hash = "sha256-YYEipvr0qqudKuLrINt5htl2oCp6wXWLpyvCPuwR9e8=";
hash = "sha256-FukxXuZwF7P5tUao0nTT7bELGIYivtoOBQQkHA7ZE3s=";
};
sourceRoot = "${src.name}/caddy";
@@ -45,7 +45,7 @@ buildGoModule rec {
# frankenphp requires C code that would be removed with `go mod tidy`
# https://github.com/golang/go/issues/26366
proxyVendor = true;
vendorHash = "sha256-M1z9Yv+WomKA+UACOUT8xcWdw+SD1MY2jfaDO4zYUQg=";
vendorHash = "sha256-likIETO/eq1kATNbbYHxXxvIPH7q5tp3WHjz+zvNOws=";
buildInputs = [
phpUnwrapped
+2 -2
View File
@@ -6,7 +6,7 @@
gperf,
arpa2cm,
quickder,
nix-update-script,
gitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
quickder
];
passthru.updateScript = nix-update-script { };
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
description = "Little LDAP: Event-driven, lock-free kernel for dynamic data servers, clients, filters";
+2 -2
View File
@@ -7,13 +7,13 @@
}:
buildGoModule rec {
pname = "mpls";
version = "0.15.2";
version = "0.15.3";
src = fetchFromGitHub {
owner = "mhersson";
repo = "mpls";
tag = "v${version}";
hash = "sha256-UQIGg31OJ8vTqlj5JLYxOxg9oS0+PXPcdocAJbUgpzY=";
hash = "sha256-MGrvJOnjNNXU8Z9rqDIacb5awKxf50xYeNkY06U4cUk=";
};
vendorHash = "sha256-n3DG3sR7HOQPQJW1t1qC94EKkDBgXpdmjUWtLzAE7kY=";
+65
View File
@@ -0,0 +1,65 @@
{
lib,
stdenvNoCC,
fetchurl,
writeShellApplication,
cacert,
curl,
common-updater-scripts,
pup,
undmg,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "shottr";
version = "1.8.1";
src = fetchurl {
url = "https://shottr.cc/dl/Shottr-${finalAttrs.version}.dmg";
hash = "sha256-I3LNLuhIRdjKDn79HWRK2B/tVsV+1aGt/aY442y3r2I=";
};
nativeBuildInputs = [ undmg ];
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
cp -R Shottr.app "$out/Applications"
mkdir -p "$out/bin"
ln -s "$out/Applications/Shottr.app/Contents/MacOS/Shottr" "$out/bin/shottr"
runHook postInstall
'';
passthru.updateScript = lib.getExe (writeShellApplication {
name = "shottr-update-script";
runtimeInputs = [
cacert
common-updater-scripts
curl
pup
];
text = ''
version="$(curl -s https://shottr.cc/newversion.html \
| pup 'a[href*="Shottr-"] attr{href}' \
| sed -E 's|/dl/Shottr-||' \
| sed -E 's|\.dmg||')"
update-source-version shottr "$version"
'';
});
meta = {
changelog = "https://shottr.cc/newversion.html";
description = "MacOS screenshot app with scrolling screenshots, OCR, annotation and measurement instruments";
homepage = "https://shottr.cc/";
license = lib.licenses.unfree;
mainProgram = "shottr";
maintainers = with lib.maintainers; [ donteatoreo ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})
+45 -7
View File
@@ -3,7 +3,12 @@
stdenv,
fetchurl,
fetchFromGitHub,
apple-sdk,
versionCheckHook,
_experimental-update-script-combinators,
nix-update-script,
writeShellApplication,
nix,
gnugrep,
}:
let
@@ -24,29 +29,31 @@ let
"unknown";
# These files can be found in src/evaluate.h
nnueBigFile = "nn-1111cefa1111.nnue";
nnueBigFile = "nn-1c0000000000.nnue";
nnueBigHash = "sha256-HAAAAAAApn1imZnZMtDDc/dFDOQ80S0FYoaPTq+a4q0=";
nnueBig = fetchurl {
name = nnueBigFile;
url = "https://tests.stockfishchess.org/api/nn/${nnueBigFile}";
sha256 = "sha256-ERHO+hERa3cWG9SxTatMUPJuWSDHVvSGFZK+Pc1t4XQ=";
hash = nnueBigHash;
};
nnueSmallFile = "nn-37f18f62d772.nnue";
nnueSmallHash = "sha256-N/GPYtdy8xB+HWqso4mMEww8hvKrY+ZVX7vKIGNaiZ0=";
nnueSmall = fetchurl {
name = nnueSmallFile;
url = "https://tests.stockfishchess.org/api/nn/${nnueSmallFile}";
sha256 = "sha256-N/GPYtdy8xB+HWqso4mMEww8hvKrY+ZVX7vKIGNaiZ0=";
hash = nnueSmallHash;
};
in
stdenv.mkDerivation rec {
pname = "stockfish";
version = "17";
version = "17.1";
src = fetchFromGitHub {
owner = "official-stockfish";
repo = "Stockfish";
rev = "sf_${version}";
sha256 = "sha256-oXvLaC5TEUPlHjhm7tOxpNPY88QxYHFw+Cev3Q8NEeQ=";
tag = "sf_${version}";
hash = "sha256-c8o1d7/yPnF3Eo7M/MSzYuYQr2qt2tIwyu7WfuKMAzg=";
};
postUnpack = ''
@@ -64,6 +71,37 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/stockfish";
versionCheckProgramArg = "--help";
passthru = {
updateScript = _experimental-update-script-combinators.sequence [
(nix-update-script {
extraArgs = [ "--version-regex=^sf_([\\d.]+)$" ];
})
(lib.getExe (writeShellApplication {
name = "${pname}-nnue-updater";
runtimeInputs = [
nix
gnugrep
];
runtimeEnv = {
PNAME = pname;
PKG_FILE = builtins.toString ./package.nix;
NNUE_BIG_FILE = nnueBigFile;
NNUE_BIG_HASH = nnueBigHash;
NNUE_SMALL_FILE = nnueSmallFile;
NNUE_SMALL_HASH = nnueSmallHash;
};
text = builtins.readFile ./update.bash;
}))
];
};
meta = with lib; {
homepage = "https://stockfishchess.org/";
description = "Strong open source chess engine";
+20
View File
@@ -0,0 +1,20 @@
new_src="$(nix-build --attr "pkgs.$PNAME.src" --no-out-link)"
new_nnue_big_file="$(grep --perl-regexp --only-matching 'EvalFileDefaultNameBig "\Knn-(\w+).nnue' "$new_src/src/evaluate.h")"
new_nnue_small_file="$(grep --perl-regexp --only-matching 'EvalFileDefaultNameSmall "\Knn-(\w+).nnue' "$new_src/src/evaluate.h")"
new_nnue_big_hash="$(
nix hash convert --hash-algo sha256 "$(
nix-prefetch-url --type sha256 "https://tests.stockfishchess.org/api/nn/$new_nnue_big_file"
)"
)"
new_nnue_small_hash="$(
nix hash convert --hash-algo sha256 "$(
nix-prefetch-url --type sha256 "https://tests.stockfishchess.org/api/nn/$new_nnue_small_file"
)"
)"
pkg_body="$(<"$PKG_FILE")"
pkg_body="${pkg_body//"$NNUE_BIG_FILE"/"$new_nnue_big_file"}"
pkg_body="${pkg_body//"$NNUE_BIG_HASH"/"$new_nnue_big_hash"}"
pkg_body="${pkg_body//"$NNUE_SMALL_FILE"/"$new_nnue_small_file"}"
pkg_body="${pkg_body//"$NNUE_SMALL_HASH"/"$new_nnue_small_hash"}"
echo "$pkg_body" >"$PKG_FILE"
+68
View File
@@ -0,0 +1,68 @@
{
lib,
python3Packages,
fetchFromGitHub,
libclang,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "style50";
version = "2.10.4";
pyproject = true;
src = fetchFromGitHub {
owner = "cs50";
repo = "style50";
tag = "v${version}";
hash = "sha256-59V3QZMYH5edBXv1GNdoaQxerDfKmLKUZ7VL3cvDvuE=";
};
build-system = [
python3Packages.setuptools
];
dependencies = with python3Packages; [
autopep8
icdiff
jinja2
jsbeautifier
pycodestyle
python-magic
termcolor
];
preFixup = ''
makeWrapperArgs+=(--prefix PATH : ${
lib.makeBinPath [
libclang # clang-format
]
})
'';
pythonRelaxDeps = [
"pycodestyle"
];
pythonRemoveDeps = [
"clang-format"
];
pythonImportsCheck = [ "style50" ];
nativeCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
# no python tests
meta = {
description = "Tool for checking code against the CS50 style guide";
homepage = "https://cs50.readthedocs.io/style50/";
downloadPage = "https://github.com/cs50/style50";
changelog = "https://github.com/cs50/style50/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ethancedwards8 ];
mainProgram = "style50";
};
}
@@ -2,6 +2,7 @@
stdenv,
lib,
mkXfceDerivation,
python3,
wayland-scanner,
glib,
gtk3,
@@ -22,12 +23,13 @@
mkXfceDerivation {
category = "xfce";
pname = "libxfce4windowing";
version = "4.20.2";
version = "4.20.3";
sha256 = "sha256-Xw1hs854K5dZCAYoBMoqJzdSxPRFUYqEpWxg4DLSK5Q=";
sha256 = "sha256-l58cTz28UPSVfoIpjBCoSwcqdUJfG9e4UlhVYPyEeAs=";
nativeBuildInputs =
[
python3
wayland-scanner
]
++ lib.optionals withIntrospection [
@@ -46,6 +48,10 @@ mkXfceDerivation {
wlr-protocols
];
postPatch = ''
patchShebangs xdt-gen-visibility
'';
meta = {
description = "Windowing concept abstraction library for X11 and Wayland";
license = lib.licenses.lgpl21Plus;
File diff suppressed because it is too large Load Diff
@@ -349,6 +349,9 @@ stdenv.mkDerivation (finalAttrs: {
++ optionals (pythonAtLeast "3.13") [
./3.13/virtualenv-permissions.patch
]
++ optionals (pythonAtLeast "3.14") [
./3.14/CVE-2025-4517.patch
]
++ optionals mimetypesSupport [
# Make the mimetypes module refer to the right file
./mimetypes.patch
@@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "pyngrok";
version = "7.2.9";
version = "7.2.11";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-Ixt/1Kel6CZajWFQ07o8gtnf/UCe2u23LE5isy3kT5E=";
hash = "sha256-n4iQOJvZWrwA7KE4Rsj0haDbZmfcBZh+uY/eNDrfslo=";
};
build-system = [
+2 -2
View File
@@ -43,13 +43,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "prl-tools";
version = "20.3.1-55959";
version = "20.3.2-55975";
# We download the full distribution to extract prl-tools-lin.iso from
# => ${dmg}/Parallels\ Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso
src = fetchurl {
url = "https://download.parallels.com/desktop/v${lib.versions.major finalAttrs.version}/${finalAttrs.version}/ParallelsDesktop-${finalAttrs.version}.dmg";
hash = "sha256-/J6NouI2htptG06Undeg1rUfbWUu6q/nV2P9D+sS7OA=";
hash = "sha256-eazDR+eSUcp81XdRfYRHIt7E4FNCEjsh0M0wYQQYmMQ=";
};
hardeningDisable = [
+8 -3
View File
@@ -12,6 +12,7 @@
postgresqlBuildExtension,
postgresqlTestExtension,
python3,
unstableGitUpdater,
}:
let
@@ -19,13 +20,13 @@ let
in
postgresqlBuildExtension (finalAttrs: {
pname = "omnigres";
version = "0-unstable-2025-05-16";
version = "0-unstable-2025-06-03";
src = fetchFromGitHub {
owner = "omnigres";
repo = "omnigres";
rev = "84f14792d80fb6fd60b680b7825245a8e7c5583e";
hash = "sha256-jOlHXl7ANhMwOPizd5KH+wYZmBNNkkIa9jbXZR8Xu28=";
rev = "d347be5ae1d79645ac277d19080eacba7b229cf8";
hash = "sha256-LKsH+aeLg7v2RfK80D3mgXdPB8jMIv5uFdf+3c5Z0vA=";
};
strictDeps = true;
@@ -75,6 +76,10 @@ postgresqlBuildExtension (finalAttrs: {
'';
};
passthru.updateScript = unstableGitUpdater {
hardcodeZeroVersion = true;
};
meta = {
description = "Postgres as a Business Operating System";
homepage = "https://docs.omnigres.org";