Skip to content

Commit

Permalink
Man and desktop entry additions
Browse files Browse the repository at this point in the history
- Plus some splits into post and pre stages of the phases
  • Loading branch information
EmanuelM153 committed Jan 10, 2025
1 parent 4d81091 commit bf9896c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion pkgs/by-name/op/open-adventure/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
libedit,
cppcheck,
coreutils,
asciidoctor,
}:

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -23,6 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
python3Packages.python
python3Packages.pyyaml
pkg-config
asciidoctor
];

buildInputs = [ libedit ];
Expand All @@ -44,13 +46,26 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace tests/tapview --replace-fail "/bin/echo" ${lib.getExe' coreutils "echo"}
'';

postBuild = ''
make advent.6
'';

preInstall = ''
mkdir -vp "$out/bin" "$out/share/man/man6" "$out/share/applications/" "$out/share/icons/hicolor/scalable/apps"
'';

installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ./advent $out/bin
runHook postInstall
'';

postInstall = ''
cp ./advent.6 $out/share/man/man6
cp ./advent.desktop $out/share/applications
cp ./advent.svg $out/share/icons/hicolor/scalable/apps
'';

meta = {
description = "Forward-port of the Crowther/Woods Adventure 2.5 game from 1995";
longDescription = ''
Expand Down

0 comments on commit bf9896c

Please sign in to comment.