zod: modernize package expression and fix pname scoping

- switch `sha256` to `hash` with SRI-style value
- replace interpolated `${pname}` in sub-derivations with explicit names:
- zod-engine-engine
- zod-engine-map_editor
- zod-engine-launcher
- zod-engine-assets
- drop unnecessary `with lib;` in `meta` and fully qualify attributes
(`lib.maintainers`, `lib.licenses`, `lib.platforms`)

This improves attribute hygiene, avoids accidental pname shadowing,
and aligns the package with current Nixpkgs conventions.

+9 -9
+9 -9
pkgs/by-name/zo/zod/package.nix
··· 21 21 version = "2011-09-06"; 22 22 src = fetchzip { 23 23 url = "mirror://sourceforge/zod/linux_releases/zod_linux-${version}.tar.gz"; 24 - sha256 = "017v96aflrv07g8j8zk9mq8f8rqxl5228rjff5blq8dxpsv1sx7h"; 24 + hash = "sha256-8HQdtr69IUxXcU5mJEShHWfkEK5pfiTRO2Bn6pRJ+wQ="; 25 25 }; 26 26 postPatch = '' 27 27 sed '1i#include <ctime>' -i zod_src/common.cpp # gcc12 ··· 50 50 hardeningDisable 51 51 NIX_LDFLAGS 52 52 ; 53 - pname = "${pname}-engine"; 53 + pname = "zod-engine-engine"; 54 54 enableParallelBuilding = true; 55 55 preBuild = "cd zod_src"; 56 56 installPhase = '' ··· 69 69 hardeningDisable 70 70 NIX_LDFLAGS 71 71 ; 72 - pname = "${pname}-map_editor"; 72 + pname = "zod-engine-map_editor"; 73 73 enableParallelBuilding = true; 74 74 preBuild = "cd zod_src"; 75 75 makeFlags = [ "map_editor" ]; ··· 88 88 zod_engine 89 89 zod_map_editor 90 90 ; 91 - pname = "${pname}-launcher"; 91 + pname = "zod-engine-launcher"; 92 92 # This is necessary because the zod_launcher has terrible fixed-width window 93 93 # the Idea is to apply the scalingFactor to all positions and sizes and I tested 1,2,3 and 4 94 94 # 2,3,4 look acceptable on my 4k monitor and 1 is unreadable. ··· 109 109 install -m755 zod_launcher $out/bin 110 110 ''; 111 111 }; 112 - zod_assets = runCommandLocal "${pname}-assets" { } '' 112 + zod_assets = runCommandLocal "zod-engine-assets" { } '' 113 113 mkdir -p $out/usr/lib/commander-zod{,blank_maps} 114 114 cp -r ${src}/assets $out/usr/lib/commander-zod/assets 115 115 for i in ${src}/*.map ${src}/*.txt; do ··· 128 128 zod_map_editor 129 129 zod_assets 130 130 ]; 131 - meta = with lib; { 131 + meta = { 132 132 description = "Multiplayer remake of ZED"; 133 133 homepage = "https://zod.sourceforge.net/"; 134 - maintainers = with maintainers; [ zeri ]; 135 - license = licenses.gpl3Plus; # Says the website 136 - platforms = platforms.linux; 134 + maintainers = with lib.maintainers; [ zeri ]; 135 + license = lib.licenses.gpl3Plus; # Says the website 136 + platforms = lib.platforms.linux; 137 137 }; 138 138 }