nixos-config/pkgs/decker/default.nix

61 lines
1.3 KiB
Nix
Raw Normal View History

2022-11-02 10:44:52 +00:00
{ stdenv
, lib
, fetchFromGitHub
, SDL2
, SDL2_image
, unixtools
, multimarkdown
}:
stdenv.mkDerivation rec {
pname = "decker";
2022-12-20 03:10:34 +00:00
version = "1.7";
2022-11-02 10:44:52 +00:00
src = fetchFromGitHub {
owner = "JohnEarnest";
repo = "Decker";
2022-11-15 06:42:51 +00:00
rev = "v${version}";
2022-12-20 03:10:34 +00:00
sha256 = "sha256-yfUD+qvINx0QLvXwuc4MTEK/Z1tcHpy0ZK4peCfkozk=";
2022-11-02 10:44:52 +00:00
};
buildInputs = [
SDL2
SDL2_image
multimarkdown
unixtools.xxd
];
buildPhase = ''
make lilt
make decker
make docs
'';
installPhase = ''
runHook preInstall
install -Dm0755 ./c/build/lilt -t $out/bin
install -Dm0755 ./c/build/decker -t $out/bin
install -Dm0644 ./syntax/vim/ftdetect/lil.vim -t $out/etc/xdg/vim/ftdetect
install -Dm0644 ./syntax/vim/syntax/lil.vim -t $out/etc/xdg/vim/syntax
install -Dm0644 ./examples/decks/*.deck -t $out/share/decker/examples/decks
install -Dm0644 ./examples/lilt/*.lil -t $out/share/decker/examples/lilt
mkdir -p $out/share/doc
cp -r ./docs/* $out/share/doc
runHook postInstall
'';
postPatch = ''
patchShebangs ./scripts/*
'';
meta = with lib; {
2022-12-20 03:10:34 +00:00
homepage = "https://beyondloom.com/decker";
2022-11-02 10:44:52 +00:00
description = "Multimedia platform for creating and sharing interactive documents";
license = licenses.mit;
platforms = platforms.all;
};
}