From 5d9de240e36e961d38bd703cc3140be38aac3dc6 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 25 May 2024 21:30:40 -0300 Subject: [PATCH 1/3] vms-empire: migrate to by-name --- .../default.nix => by-name/vm/vms-empire/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{games/vms-empire/default.nix => by-name/vm/vms-empire/package.nix} (100%) diff --git a/pkgs/games/vms-empire/default.nix b/pkgs/by-name/vm/vms-empire/package.nix similarity index 100% rename from pkgs/games/vms-empire/default.nix rename to pkgs/by-name/vm/vms-empire/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index acc4b8c93379..768d14d61949 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37452,8 +37452,6 @@ with pkgs; vitetris = callPackage ../games/vitetris { }; - vms-empire = callPackage ../games/vms-empire { }; - voxelands = callPackage ../games/voxelands { }; vvvvvv = callPackage ../by-name/vv/vvvvvv/package.nix { From 0ae59f20e2693d597b5cdfed17c1943b8b4101db Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 25 May 2024 22:00:01 -0300 Subject: [PATCH 2/3] vms-empire: refactor - finalAttrs - buildInputs and nativeBuildInputs - strictDeps as *false* - split outputs - no nested with --- pkgs/by-name/vm/vms-empire/package.nix | 36 +++++++++++++++++--------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/vm/vms-empire/package.nix b/pkgs/by-name/vm/vms-empire/package.nix index 9da37789f7cd..b51004af0d46 100644 --- a/pkgs/by-name/vm/vms-empire/package.nix +++ b/pkgs/by-name/vm/vms-empire/package.nix @@ -8,23 +8,35 @@ , installShellFiles }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "vms-empire"; version = "1.16"; src = fetchurl{ - url = "http://www.catb.org/~esr/${pname}/${pname}-${version}.tar.gz"; + url = "http://www.catb.org/~esr/vms-empire/vms-empire-${finalAttrs.version}.tar.gz"; hash = "sha256-XETIbt/qVU+TpamPc2WQynqqUuZqkTUnItBprjg+gPk="; }; - nativeBuildInputs = [ installShellFiles ]; - buildInputs = [ - ncurses + nativeBuildInputs = [ + installShellFiles xmlto docbook_xml_dtd_44 docbook_xsl ]; + buildInputs = [ + ncurses + ]; + + outputs = [ + "out" + "doc" + "man" + ]; + + # when true, can't find XML + strictDeps = false; + postBuild = '' xmlto man vms-empire.xml xmlto html-nochunks vms-empire.xml @@ -33,7 +45,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall install -D vms-empire -t ${placeholder "out"}/bin/ - install -D vms-empire.html -t ${placeholder "out"}/share/doc/${pname}/ + install -D vms-empire.html -t ${placeholder "doc"}/share/doc/vms-empire/ install -D vms-empire.desktop -t ${placeholder "out"}/share/applications/ install -D vms-empire.png -t ${placeholder "out"}/share/icons/hicolor/48x48/apps/ install -D vms-empire.xml -t ${placeholder "out"}/share/appdata/ @@ -43,10 +55,9 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - meta = with lib; { + meta = { homepage = "http://catb.org/~esr/vms-empire/"; description = "The ancestor of all expand/explore/exploit/exterminate games"; - mainProgram = "vms-empire"; longDescription = '' Empire is a simulation of a full-scale war between two emperors, the computer and you. Naturally, there is only room for one, so the object of @@ -55,8 +66,9 @@ stdenv.mkDerivation rec { expand/explore/exploit/exterminate games, including Civilization and Master of Orion. ''; - license = licenses.gpl2Only; - maintainers = [ maintainers.AndersonTorres ]; - platforms = platforms.unix; + license = lib.licenses.gpl2Only; + mainProgram = "vms-empire"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; }; -} +}) From b6cceadf9c8d288d8c59a768c766089dbbee76fc Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 25 May 2024 22:10:31 -0300 Subject: [PATCH 3/3] vms-empire: 1.16 -> 1.17 --- pkgs/by-name/vm/vms-empire/package.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/vm/vms-empire/package.nix b/pkgs/by-name/vm/vms-empire/package.nix index b51004af0d46..157d834ef914 100644 --- a/pkgs/by-name/vm/vms-empire/package.nix +++ b/pkgs/by-name/vm/vms-empire/package.nix @@ -10,11 +10,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "vms-empire"; - version = "1.16"; + version = "1.17"; src = fetchurl{ url = "http://www.catb.org/~esr/vms-empire/vms-empire-${finalAttrs.version}.tar.gz"; - hash = "sha256-XETIbt/qVU+TpamPc2WQynqqUuZqkTUnItBprjg+gPk="; + hash = "sha256-AmHs6ojVcfglvvFvC9JzNWVS2t4Coqg8WwyNCM+sEno="; }; nativeBuildInputs = [ @@ -34,8 +34,7 @@ stdenv.mkDerivation (finalAttrs: { "man" ]; - # when true, can't find XML - strictDeps = false; + strictDeps = true; postBuild = '' xmlto man vms-empire.xml @@ -53,8 +52,6 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - hardeningDisable = [ "format" ]; - meta = { homepage = "http://catb.org/~esr/vms-empire/"; description = "The ancestor of all expand/explore/exploit/exterminate games";