Files
nixpkgs/pkgs/by-name/de/decker/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

87 lines
1.9 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
SDL2,
SDL2_image,
unixtools,
multimarkdown,
}:
stdenv.mkDerivation rec {
pname = "decker";
version = "1.60";
src = fetchFromGitHub {
owner = "JohnEarnest";
repo = "Decker";
rev = "v${version}";
hash = "sha256-A8lsQs3fZm8XREHx2IPRNWZp4tTZ4Jya30+gBT6xME8=";
};
buildInputs = [
SDL2
SDL2_image
multimarkdown
unixtools.xxd
];
doCheck = true;
postPatch = ''
patchShebangs ./scripts
'';
buildPhase = ''
runHook preBuild
make lilt
make decker
make docs
runHook postBuild
'';
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.cc.isClang [
"-Wno-error=implicit-const-int-float-conversion"
]
);
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/share/vim-plugins/decker/ftdetect
install -Dm0644 ./syntax/vim/syntax/lil.vim -t $out/share/vim-plugins/decker/syntax
# Fixing the permissions of the installed files on the documentation.
chmod a-x ./docs/images/* \
./docs/*.md \
./examples/decks/*.deck \
./examples/lilt/*.lil
# This example has a shebang so we'll leave it as an executable.
chmod a+x ./examples/lilt/podcasts.lil
mkdir -p $out/share/doc/decker
cp -r ./docs/*.html ./docs/images ./examples $out/share/doc/decker
runHook postInstall
'';
checkPhase = ''
runHook preCheck
make test
runHook postCheck
'';
meta = with lib; {
homepage = "https://beyondloom.com/decker";
description = "Multimedia platform for creating and sharing interactive documents";
license = licenses.mit;
mainProgram = "decker";
platforms = platforms.all;
maintainers = with maintainers; [ foo-dogsquared ];
};
}