git.iko.soy/typeable/nixpkgs
on master help sign in
inklecate: init at version 1.0.0

inklecate is a command line compiler for the ink language, which is used to make interactive narrative / choose-your-own-adventure style games. More information about the ink language can be found at https://github.com/inkle/ink

commit23a95af60f6ba0428a158d0544dbbc0b36920677 authorShreeram Modi <67710369+Shrimpram@users.noreply.github.com> dateWed 7 Jul 2021, 17:54 (5 years ago) parent529c7af
2 files changed+56
pkgs/development/compilers/inklecate/default.nix+54 pkgs/top-level/all-packages.nix+2
pkgs/development/compilers/inklecate/default.nixnew file+54
@@ -0,0 +1,54 @@
1+{ lib, stdenv, fetchurl, unzip, makeWrapper }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "inklecate";
5+ version = "1.0.0";
6+
7+ src =
8+ if stdenv.isLinux then
9+ fetchurl {
10+ url = "https://github.com/inkle/ink/releases/download/v${version}/inklecate_linux.zip";
11+ sha256 = "6e17db766222998ba0ae5a5da9857e34896e683b9ec42fad528c3f8bea7398ea";
12+ name = "${pname}-${version}";
13+ }
14+ else if stdenv.isDarwin then
15+ fetchurl {
16+ url = "https://github.com/inkle/ink/releases/download/v${version}/inklecate_mac.zip";
17+ sha256 = "b6f4dd1f95c180637ce193dbb5fa6d59aeafe49a2121a05b7822e6cbbaa6931f";
18+ name = "${pname}-${version}";
19+ }
20+ else throw "Not supported on ${stdenv.hostPlatform.system}.";
21+
22+ # Work around the "unpacker appears to have produced no directories"
23+ # case that happens when the archive doesn't have a subdirectory.
24+ setSourceRoot = "sourceRoot=$(pwd)";
25+
26+ nativeBuildInputs = [ unzip makeWrapper ];
27+
28+ unpackPhase = ''
29+ unzip -qq -j $src -d $pname-$version
30+
31+ rm $pname-$version/ink-engine-runtime.dll
32+ rm $pname-$version/ink_compiler.dll
33+ '';
34+
35+ installPhase = ''
36+ mkdir -p $out/bin/
37+
38+ cp $pname-$version/inklecate $out/bin/inklecate
39+ '';
40+
41+
42+ meta = with lib; {
43+ description = "Compiler for ink, inkle's scripting language";
44+ longDescription = ''
45+ Inklecate is a command-line compiler for ink, inkle's open source
46+ scripting language for writing interactive narrative
47+ '';
48+ homepage = "https://www.inklestudios.com/ink/";
49+ downloadPage = "https://github.com/inkle/ink/releases";
50+ license = licenses.mit;
51+ platforms = platforms.unix;
52+ maintainers = with maintainers; [ shreerammodi ];
53+ };
54+}
pkgs/top-level/all-packages.nix+2
@@ -2880,6 +2880,8 @@ in
28802880
28812881 ink = callPackage ../tools/misc/ink { };
28822882
2883+ inklecate = callPackage ../development/compilers/inklecate {};
2884+
28832885 interlock = callPackage ../servers/interlock {};
28842886
28852887 iotools = callPackage ../tools/misc/iotools { };