File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1111, SDL2_net
1212, SDL2_mixer
1313, gtk3
14+ , writers
15+ , python3Packages
16+ , nix-update
1417} :
1518
1619stdenv . mkDerivation rec {
@@ -40,6 +43,33 @@ stdenv.mkDerivation rec {
4043 makeWrapper $out/{Applications/ecwolf.app/Contents/MacOS,bin}/ecwolf
4144 '' ;
4245
46+ passthru . updateScript = let
47+ updateScriptPkg = writers . writePython3 "ecwolf_update_script" {
48+ libraries = with python3Packages ; [ debian-inspector requests ] ;
49+ } ''
50+ from os import execl
51+ from sys import argv
52+
53+ from debian_inspector.debcon import get_paragraphs_data
54+ from requests import get
55+
56+ # The debian.drdteam.org repo is a primary source of information. It’s
57+ # run by Blzut3, the creator and primary developer of ECWolf. It’s also
58+ # listed on ECWolf’s download page:
59+ # <https://maniacsvault.net/ecwolf/download.php>.
60+ url = 'https://debian.drdteam.org/dists/stable/multiverse/binary-amd64/Packages' # noqa: E501
61+ response = get(url)
62+ packages = get_paragraphs_data(response.text)
63+ for package in packages:
64+ if package['package'] == 'ecwolf':
65+ latest_version = package['version']
66+ break
67+ nix_update_path = argv[1]
68+
69+ execl(nix_update_path, nix_update_path, '--version', latest_version)
70+ '' ;
71+ in [ updateScriptPkg ( lib . getExe nix-update ) ] ;
72+
4373 meta = with lib ; {
4474 description = "Enhanched SDL-based port of Wolfenstein 3D for various platforms" ;
4575 mainProgram = "ecwolf" ;
You can’t perform that action at this time.
0 commit comments