2021-10-14 00:43:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchgit
|
2023-07-15 17:15:38 +00:00
|
|
|
, pkg-config
|
|
|
|
, xxd
|
2021-10-14 00:43:12 +00:00
|
|
|
, SDL2
|
|
|
|
, alsa-lib
|
|
|
|
, babl
|
2023-07-15 17:15:38 +00:00
|
|
|
, bash
|
|
|
|
, cairo
|
2021-10-14 00:43:12 +00:00
|
|
|
, curl
|
|
|
|
, libdrm # Not documented
|
|
|
|
, enableFb ? false
|
2022-03-30 09:31:56 +00:00
|
|
|
, nixosTests
|
2021-10-14 00:43:12 +00:00
|
|
|
}:
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-10-14 00:43:12 +00:00
|
|
|
pname = "ctx";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "unstable-2023-06-05";
|
2021-10-14 00:43:12 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
name = "ctx-source"; # because of a dash starting the directory
|
|
|
|
url = "https://ctx.graphics/.git/";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "2eb3886919d0a0b8c305e4f9e18428dad5e73ca0";
|
|
|
|
sha256 = "sha256-PLUyGArxLU742IKIgpzxdBdc94mWWSkHNFoXGW8L/Zo=";
|
2021-10-14 00:43:12 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = [
|
|
|
|
./0001-Make-arch-detection-optional-and-fix-targets.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./tools/gen_fs.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
env.ARCH = stdenv.hostPlatform.parsed.cpu.arch;
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2023-07-15 17:15:38 +00:00
|
|
|
xxd
|
2021-10-14 00:43:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
alsa-lib
|
|
|
|
babl
|
2023-07-15 17:15:38 +00:00
|
|
|
bash # for ctx-audioplayer
|
|
|
|
cairo
|
2021-10-14 00:43:12 +00:00
|
|
|
curl
|
|
|
|
libdrm
|
|
|
|
];
|
|
|
|
|
|
|
|
configureScript = "./configure.sh";
|
|
|
|
configureFlags = lib.optional enableFb "--enable-fb";
|
2023-07-15 17:15:38 +00:00
|
|
|
configurePlatforms = [];
|
2021-10-14 00:43:12 +00:00
|
|
|
dontAddPrefix = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
dontDisableStatic = true;
|
2021-10-14 00:43:12 +00:00
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
passthru.tests.test = nixosTests.terminal-emulators.ctx;
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://ctx.graphics/";
|
|
|
|
description = "Vector graphics terminal";
|
|
|
|
longDescription= ''
|
|
|
|
ctx is an interactive 2D vector graphics, audio, text- canvas and
|
|
|
|
terminal, with escape sequences that enable a 2D vector drawing API using
|
|
|
|
a vector graphics protocol.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ AndersonTorres];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|