nixpkgs/pkgs/by-name/ct/ctx/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

83 lines
1.8 KiB
Nix
Raw Normal View History

2021-10-13 20:55:51 +00:00
{ lib
, stdenv
, fetchgit
, SDL2
, alsa-lib
, babl
, bash
2021-10-13 20:55:51 +00:00
, curl
, libdrm # Not documented
, pkg-config
, xxd
2021-10-13 20:55:51 +00:00
, enableFb ? false
, nixosTests
2021-10-13 20:55:51 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
2021-10-13 20:55:51 +00:00
pname = "ctx";
version = "unstable-2023-09-03";
2021-10-13 20:55:51 +00:00
src = fetchgit {
name = "ctx-source"; # because of a dash starting the directory
url = "https://ctx.graphics/.git/";
rev = "1bac18c152eace3ca995b3c2b829a452085d46fb";
hash = "sha256-fOcQJ2XCeomdtAUmy0A+vU7Vt325OSwrb1+ccW+gZ38=";
2021-10-13 20:55:51 +00:00
};
patches = [
# Many problematic things fixed - it should be upstreamed somehow:
# - babl changed its name in pkg-config files
# - arch detection made optional
# - LD changed to CCC
# - remove inexistent reference to static/*/*
./0001-fix-detections.diff
];
postPatch = ''
patchShebangs ./tools/gen_fs.sh
'';
2021-10-13 20:55:51 +00:00
nativeBuildInputs = [
pkg-config
xxd
2021-10-13 20:55:51 +00:00
];
buildInputs = [
SDL2
alsa-lib
babl
bash # for ctx-audioplayer
2021-10-13 20:55:51 +00:00
curl
libdrm
];
strictDeps = true;
env.ARCH = stdenv.hostPlatform.parsed.cpu.arch;
2021-10-13 20:55:51 +00:00
configureScript = "./configure.sh";
configureFlags = lib.optional enableFb "--enable-fb";
configurePlatforms = [];
2021-10-13 20:55:51 +00:00
dontAddPrefix = true;
dontDisableStatic = true;
2021-10-13 20:55:51 +00:00
installFlags = [
"PREFIX=${placeholder "out"}"
];
passthru.tests.test = nixosTests.terminal-emulators.ctx;
meta = {
2021-10-13 20:55:51 +00:00
homepage = "https://ctx.graphics/";
description = "Vector graphics terminal";
longDescription = ''
2021-10-13 20:55:51 +00:00
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 = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
2021-10-13 20:55:51 +00:00
};
})