Skip to content

Instantly share code, notes, and snippets.

@jboynyc
Last active March 7, 2024 22:09
Show Gist options
  • Save jboynyc/377018692c55e7971ed3b1b09c808d0e to your computer and use it in GitHub Desktop.
Save jboynyc/377018692c55e7971ed3b1b09c808d0e to your computer and use it in GitHub Desktop.
nix derivation for Dialog
with import <nixpkgs> {};
let
aamachineSrc = fetchzip {
url = "https://hd0.linusakesson.net/files/aamachine-0.5.4.zip";
sha256 = "sha256-TDAwcNwGW4GMNv8e3VuKbNMSYLHDIQNlc4REQb+FRvw=";
};
aamachineVersion = "0.5.4";
in
stdenv.mkDerivation {
name = "aamachine";
version = aamachineVersion;
src = "${aamachineSrc}/src";
NIX_CFLAGS_COMPILE = "-Wno-format-security";
installPhase = ''
install aambundle -Dt $out/bin
install aashow -Dt $out/bin
'';
meta = with lib; {
description = "A virtual machine for delivering interactive stories.";
homepage = "https://www.linusakesson.net/dialog/aamachine";
license = with licenses; [ bsd2 ];
};
}
with import <nixpkgs> {};
let
dialogSrc = fetchzip {
url = "https://hd0.linusakesson.net/files/dialog-0m03_0_46.zip";
sha256 = "sha256-bTs0h6LBaSsUXBpM5jeoOyiaz0w1Um8BcXIcji9ZadY=";
};
dialogVersion = "0m/03";
in
stdenv.mkDerivation {
name = "dialog";
version = dialogVersion;
src = "${dialogSrc}/src";
NIX_CFLAGS_COMPILE = "-Wno-format-security";
installPhase = ''
install dialogc -Dt $out/bin
install dgdebug -Dt $out/bin
mkdir -p $out/{lib,share}
cp ${dialogSrc}/*.dg $out/lib
cp ${dialogSrc}/*.txt $out/share
cp -r ${dialogSrc}/docs $out/share
'';
meta = with lib; {
description = "Domain-specific language for creating works of interactive fiction";
homepage = "https://www.linusakesson.net/dialog/";
license = with licenses; [ bsd2 ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment