diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/by-name/si/sile/package.nix
similarity index 62%
rename from pkgs/tools/typesetting/sile/default.nix
rename to pkgs/by-name/si/sile/package.nix
index 49dbc74422e7..a3c4f0bc1143 100644
--- a/pkgs/tools/typesetting/sile/default.nix
+++ b/pkgs/by-name/si/sile/package.nix
@@ -1,47 +1,54 @@
-{ lib
-, stdenv
-, darwin
-, fetchurl
-, makeWrapper
-, pkg-config
-, poppler_utils
-, gitMinimal
-, harfbuzz
-, icu
-, fontconfig
-, lua
-, libiconv
-, makeFontsConf
-, gentium
-, runCommand
-, sile
+{
+ lib,
+ stdenv,
+ darwin,
+ fetchurl,
+ makeWrapper,
+ pkg-config,
+ poppler_utils,
+ gitMinimal,
+ harfbuzz,
+ icu,
+ fontconfig,
+ lua,
+ libiconv,
+ makeFontsConf,
+ gentium,
+ runCommand,
+ sile,
}:
let
- luaEnv = lua.withPackages(ps: with ps; [
- cassowary
- cldr
- cosmo
- fluent
- linenoise
- loadkit
- lpeg
- lua-zlib
- lua_cliargs
- luaepnf
- luaexpat
- luafilesystem
- luarepl
- luasec
- luasocket
- luautf8
- penlight
- vstruct
- ] ++ lib.optionals (lib.versionOlder lua.luaversion "5.2") [
- bit32
- ] ++ lib.optionals (lib.versionOlder lua.luaversion "5.3") [
- compat53
- ]);
+ luaEnv = lua.withPackages (
+ ps:
+ with ps;
+ [
+ cassowary
+ cldr
+ cosmo
+ fluent
+ linenoise
+ loadkit
+ lpeg
+ lua-zlib
+ lua_cliargs
+ luaepnf
+ luaexpat
+ luafilesystem
+ luarepl
+ luasec
+ luasocket
+ luautf8
+ penlight
+ vstruct
+ ]
+ ++ lib.optionals (lib.versionOlder lua.luaversion "5.2") [
+ bit32
+ ]
+ ++ lib.optionals (lib.versionOlder lua.luaversion "5.3") [
+ compat53
+ ]
+ );
in
stdenv.mkDerivation (finalAttrs: {
@@ -69,9 +76,7 @@ stdenv.mkDerivation (finalAttrs: {
icu
fontconfig
libiconv
- ]
- ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.AppKit
- ;
+ ] ++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.AppKit;
passthru = {
# So it will be easier to inspect this environment, in comparison to others
inherit luaEnv;
@@ -79,20 +84,27 @@ stdenv.mkDerivation (finalAttrs: {
tests.test = lib.optionalAttrs (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) (
runCommand "sile-test"
{
- nativeBuildInputs = [ poppler_utils sile ];
+ nativeBuildInputs = [
+ poppler_utils
+ sile
+ ];
inherit (finalAttrs) FONTCONFIG_FILE;
- } ''
- output=$(mktemp -t selfcheck-XXXXXX.pdf)
- echo "foo" | sile -o $output -
- pdfinfo $output | grep "SILE v${finalAttrs.version}" > $out
- '');
+ }
+ ''
+ output=$(mktemp -t selfcheck-XXXXXX.pdf)
+ echo "foo" | sile -o $output -
+ pdfinfo $output | grep "SILE v${finalAttrs.version}" > $out
+ ''
+ );
};
- postPatch = ''
- patchShebangs build-aux/*.sh
- '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
- sed -i -e 's|@import AppKit;|#import |' src/macfonts.m
- '';
+ postPatch =
+ ''
+ patchShebangs build-aux/*.sh
+ ''
+ + lib.optionalString stdenv.hostPlatform.isDarwin ''
+ sed -i -e 's|@import AppKit;|#import |' src/macfonts.m
+ '';
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit";
@@ -118,7 +130,12 @@ stdenv.mkDerivation (finalAttrs: {
done
'';
- outputs = [ "out" "doc" "man" "dev" ];
+ outputs = [
+ "out"
+ "doc"
+ "man"
+ "dev"
+ ];
meta = with lib; {
description = "Typesetting system";
@@ -135,7 +152,10 @@ stdenv.mkDerivation (finalAttrs: {
homepage = "https://sile-typesetter.org";
changelog = "https://github.com/sile-typesetter/sile/raw/v${finalAttrs.version}/CHANGELOG.md";
platforms = platforms.unix;
- maintainers = with maintainers; [ doronbehar alerque ];
+ maintainers = with maintainers; [
+ doronbehar
+ alerque
+ ];
license = licenses.mit;
mainProgram = "sile";
};
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3756a72b7c3f..f7d5c8e90cf6 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -12107,10 +12107,6 @@ with pkgs;
silc_server = callPackage ../servers/silc-server { };
- sile = callPackage ../tools/typesetting/sile {
- lua = lua5_3;
- };
-
silenthound = callPackage ../tools/security/silenthound { };
silice = callPackage ../development/compilers/silice { };