Merge pull request #309594 from chpatrick/anyk-3.33
anyk: 3.26.0 -> 3.33.0
This commit is contained in:
commit
aec06422ff
@ -15,13 +15,11 @@
|
||||
, python3
|
||||
}:
|
||||
let
|
||||
# Downloads can be found here: https://nav.gov.hu/nyomtatvanyok/letoltesek/nyomtatvanykitolto_programok/nyomtatvany_apeh/keretprogramok/AbevJava
|
||||
# There are no versioned download URLs but archive.org can be used to preserve them.
|
||||
# The original download URL is: https://nav.gov.hu/pfile/programFile?path=/nyomtatvanyok/letoltesek/nyomtatvanykitolto_programok/nyomtatvany_apeh/keretprogramok/AbevJava
|
||||
# You can put the URL here to create a fresh archive URL: https://web.archive.org/save
|
||||
abevjavaSrc = fetchzip {
|
||||
url = "https://web.archive.org/web/20231106112510if_/https://nav.gov.hu/pfile/programFile?path=/nyomtatvanyok/letoltesek/nyomtatvanykitolto_programok/nyomtatvany_apeh/keretprogramok/AbevJava";
|
||||
sha256 = "sha256-qt0mHv3HI6C8OltFjSR47+RLSnmB2Si5U8rXEvdN4/c=";
|
||||
# Run update.py to update this file.
|
||||
inherit (lib.importJSON ./version.json) version url sha256;
|
||||
|
||||
src = fetchzip {
|
||||
inherit url sha256;
|
||||
extension = "zip";
|
||||
stripRoot = false;
|
||||
};
|
||||
@ -49,7 +47,7 @@ let
|
||||
(runCommandLocal "anyk-patch" {} ''
|
||||
mkdir $out
|
||||
cd $out
|
||||
${unzip}/bin/unzip ${abevjavaSrc}/application/abevjava.jar hu/piller/enykp/niszws/ClientStubBuilder.class
|
||||
${unzip}/bin/unzip ${src}/application/abevjava.jar hu/piller/enykp/niszws/ClientStubBuilder.class
|
||||
${python3}/bin/python ${./patch_paths.py} hu/piller/enykp/niszws/ClientStubBuilder.class
|
||||
'')
|
||||
];
|
||||
@ -89,9 +87,7 @@ let
|
||||
'';
|
||||
in stdenv.mkDerivation {
|
||||
pname = "anyk";
|
||||
version = "3.26.0";
|
||||
|
||||
src = abevjavaSrc;
|
||||
inherit version src;
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
29
pkgs/by-name/an/anyk/update.py
Executable file
29
pkgs/by-name/an/anyk/update.py
Executable file
@ -0,0 +1,29 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 -p "python3.withPackages (p: [p.waybackpy])"
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
import re
|
||||
import json
|
||||
import waybackpy
|
||||
|
||||
# NAV doesn't provide stable versioned URLs so we put the download link in Wayback Machine to preserve it.
|
||||
|
||||
print("Archiving...")
|
||||
save_api = waybackpy.WaybackMachineSaveAPI("https://nav.gov.hu/pfile/programFile?path=/nyomtatvanyok/letoltesek/nyomtatvanykitolto_programok/nyomtatvany_apeh/keretprogramok/AbevJava")
|
||||
|
||||
url = save_api.save()
|
||||
|
||||
print("Prefetching...")
|
||||
sha256, unpack_path = subprocess.check_output(["nix-prefetch-url", "--unpack", "--print-path", url], universal_newlines=True).split("\n")[:2]
|
||||
|
||||
print("Extracting version...")
|
||||
manifest = (Path(unpack_path) / "META-INF" / "MANIFEST.MF").read_text()
|
||||
|
||||
version = re.search("Implementation-Version: (.+)", manifest).group(1)
|
||||
|
||||
print("Writing version.json...")
|
||||
(Path(__file__).parent / "version.json").write_text(json.dumps({
|
||||
"url": url,
|
||||
"sha256": sha256,
|
||||
"version": version,
|
||||
}, indent=2) + "\n")
|
5
pkgs/by-name/an/anyk/version.json
Normal file
5
pkgs/by-name/an/anyk/version.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"url": "https://web.archive.org/web/20240506155046/https://nav.gov.hu/pfile/programFile?path=/nyomtatvanyok/letoltesek/nyomtatvanykitolto_programok/nyomtatvany_apeh/keretprogramok/AbevJava",
|
||||
"sha256": "1bvhk8b5b1f5f940zzmpx7xp858p2a27iwqij43fs4kqagz2v782",
|
||||
"version": "3.33.0"
|
||||
}
|
34
pkgs/development/python-modules/waybackpy/default.nix
Normal file
34
pkgs/development/python-modules/waybackpy/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, click
|
||||
, urllib3
|
||||
, requests
|
||||
, pytest
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "waybackpy";
|
||||
version = "3.0.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-SXo3F1arp2ROt62g69TtsVy4xTvBNMyXO/AjoSyv+D8=";
|
||||
};
|
||||
|
||||
dependencies = [
|
||||
click
|
||||
urllib3
|
||||
requests
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pytest ];
|
||||
|
||||
pythonImportsCheck = [ "waybackpy" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://akamhy.github.io/waybackpy/";
|
||||
description = "Wayback Machine API interface & a command-line tool";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ chpatrick ];
|
||||
};
|
||||
}
|
@ -16837,6 +16837,8 @@ self: super: with self; {
|
||||
|
||||
wavinsentio = callPackage ../development/python-modules/wavinsentio { };
|
||||
|
||||
waybackpy = callPackage ../development/python-modules/waybackpy {};
|
||||
|
||||
wazeroutecalculator = callPackage ../development/python-modules/wazeroutecalculator { };
|
||||
|
||||
wcag-contrast-ratio = callPackage ../development/python-modules/wcag-contrast-ratio { };
|
||||
|
Loading…
Reference in New Issue
Block a user