nixpkgs/pkgs/applications/editors/texmacs/default.nix

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

88 lines
1.5 KiB
Nix
Raw Normal View History

2023-10-16 19:37:45 +00:00
{ lib, stdenv, callPackage, fetchurl,
guile_1_8, xmodmap, which, freetype,
libjpeg,
sqlite,
2017-11-20 22:29:37 +00:00
tex ? null,
aspell ? null,
git ? null,
python3 ? null,
cmake,
pkg-config,
2023-10-16 19:37:45 +00:00
wrapQtAppsHook,
xdg-utils,
qtbase,
qtsvg,
qtmacextras,
2017-11-20 22:29:37 +00:00
ghostscriptX ? null,
extraFonts ? false,
chineseFonts ? false,
japaneseFonts ? false,
koreanFonts ? false }:
let
2023-10-16 19:37:45 +00:00
pname = "texmacs";
version = "2.1.2";
2017-11-20 22:29:37 +00:00
common = callPackage ./common.nix {
inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
};
in
2023-10-16 19:37:45 +00:00
stdenv.mkDerivation {
2021-01-27 12:06:32 +00:00
inherit pname version;
2021-01-27 12:06:32 +00:00
src = fetchurl {
url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
2023-10-16 19:37:45 +00:00
hash = "sha256-Ds9gxOwMYSttEWrawgxLHGxHyMBvt8WmyPIwBP2g/CM=";
};
2023-10-16 19:37:45 +00:00
postPatch = common.postPatch + ''
substituteInPlace configure \
--replace "-mfpmath=sse -msse2" ""
'';
nativeBuildInputs = [
guile_1_8
pkg-config
wrapQtAppsHook
xdg-utils
] ++ lib.optionals (!stdenv.isDarwin) [
cmake
];
buildInputs = [
guile_1_8
2020-04-09 14:05:11 +00:00
qtbase
2023-10-16 19:37:45 +00:00
qtsvg
ghostscriptX
freetype
libjpeg
sqlite
git
python3
2023-10-16 19:37:45 +00:00
] ++ lib.optionals stdenv.isDarwin [
qtmacextras
];
2023-10-16 19:37:45 +00:00
env.NIX_LDFLAGS = "-lz";
2020-04-09 14:05:11 +00:00
qtWrapperArgs = [
"--suffix" "PATH" ":" (lib.makeBinPath [
xmodmap
which
ghostscriptX
aspell
tex
git
python3
])
];
postFixup = ''
wrapQtApp $out/bin/texmacs
'';
2017-11-20 22:29:37 +00:00
meta = common.meta // {
2020-04-09 14:05:11 +00:00
maintainers = [ lib.maintainers.roconnor ];
2023-10-16 19:37:45 +00:00
platforms = lib.platforms.all;
};
}