2022-04-27 18:30:01 +01:00
|
|
|
{ stdenvNoCC, lib, fetchFromGitea, just, inkscape, makeWrapper, bash, dialog }:
|
2022-04-25 11:02:42 +01:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "kabeljau";
|
2022-04-27 18:30:01 +01:00
|
|
|
version = "1.2.0";
|
2022-04-25 11:02:42 +01:00
|
|
|
|
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "codeberg.org";
|
|
|
|
owner = "papojari";
|
|
|
|
repo = "kabeljau";
|
|
|
|
rev = "v${version}";
|
2022-04-27 18:30:01 +01:00
|
|
|
sha256 = "sha256-RedVItgfr6vgqXHA3bOiHXDpfGuHI+sX4jCHL9G5jYk=";
|
2022-04-25 11:02:42 +01:00
|
|
|
};
|
|
|
|
|
2022-04-27 18:30:01 +01:00
|
|
|
# Inkscape is needed in a just recipe where it is used to export the SVG icon to several different sized PNGs.
|
|
|
|
nativeBuildInputs = [ just inkscape makeWrapper ];
|
2022-04-25 11:02:42 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs --host ${pname}
|
2022-04-27 18:30:01 +01:00
|
|
|
substituteInPlace ./justfile \
|
|
|
|
--replace " /bin" " $out/bin" \
|
|
|
|
--replace " /usr" " $out"
|
2022-04-25 11:02:42 +01:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-04-27 18:30:01 +01:00
|
|
|
just install
|
2022-04-25 11:02:42 +01:00
|
|
|
wrapProgram $out/bin/${pname} --suffix PATH : ${
|
|
|
|
lib.makeBinPath [ dialog ]
|
|
|
|
}
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Survive as a stray cat in an ncurses game";
|
|
|
|
homepage = "https://codeberg.org/papojari/kabeljau";
|
|
|
|
license = licenses.lgpl3Only;
|
|
|
|
maintainers = with maintainers; [ papojari ];
|
|
|
|
};
|
|
|
|
}
|