Skip to content

Commit 251d104

Browse files
committed
sile: reformatting, not changing drv at all
Put all inputs on separate lines and don't use `with stdenv.lib` for large scopes.
1 parent 7bf0f73 commit 251d104

1 file changed

Lines changed: 53 additions & 16 deletions

File tree

pkgs/tools/typesetting/sile/default.nix

Lines changed: 53 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
1-
{ stdenv, darwin, fetchurl, makeWrapper, pkgconfig, autoconf, automake
2-
, harfbuzz, icu
3-
, fontconfig, lua, libiconv
4-
, makeFontsConf, gentium
1+
{ stdenv
2+
, darwin
3+
, fetchurl
4+
, makeWrapper
5+
, pkg-config
6+
, autoconf
7+
, automake
8+
, harfbuzz
9+
, icu
10+
, fontconfig
11+
, lua
12+
, libiconv
13+
, makeFontsConf
14+
, gentium
515
}:
616

7-
with stdenv.lib;
8-
917
let
10-
luaEnv = lua.withPackages(ps: with ps;[cassowary cosmo compat53 linenoise lpeg lua-zlib lua_cliargs luaepnf luaexpat luafilesystem luarepl luasec luasocket stdlib vstruct]);
11-
18+
luaEnv = lua.withPackages(ps: with ps; [
19+
cassowary
20+
cosmo
21+
compat53
22+
linenoise
23+
lpeg
24+
lua-zlib
25+
lua_cliargs
26+
luaepnf
27+
luaexpat
28+
luafilesystem
29+
luarepl
30+
luasec
31+
luasocket
32+
stdlib
33+
vstruct
34+
]);
1235
in
1336

1437
stdenv.mkDerivation rec {
@@ -20,18 +43,31 @@ stdenv.mkDerivation rec {
2043
sha256 = "08j2vv6spnzz8bsh62wbdv1pjiziiba71cadscsy5hw6pklzndni";
2144
};
2245

23-
configureFlags = [ "--with-system-luarocks" ];
24-
25-
nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
26-
buildInputs = [ harfbuzz icu fontconfig libiconv luaEnv ]
27-
++ optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit
46+
configureFlags = [
47+
"--with-system-luarocks"
48+
];
49+
50+
nativeBuildInputs = [
51+
autoconf
52+
automake
53+
pkg-config
54+
makeWrapper
55+
];
56+
buildInputs = [
57+
harfbuzz
58+
icu
59+
fontconfig
60+
libiconv
61+
luaEnv
62+
]
63+
++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit
2864
;
2965

30-
preConfigure = optionalString stdenv.isDarwin ''
66+
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
3167
sed -i -e 's|@import AppKit;|#import <AppKit/AppKit.h>|' src/macfonts.m
3268
'';
3369

34-
NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework AppKit";
70+
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework AppKit";
3571

3672
FONTCONFIG_FILE = makeFontsConf {
3773
fontDirectories = [
@@ -63,7 +99,7 @@ stdenv.mkDerivation rec {
6399

64100
outputs = [ "out" "doc" ];
65101

66-
meta = {
102+
meta = with stdenv.lib; {
67103
description = "A typesetting system";
68104
longDescription = ''
69105
SILE is a typesetting system; its job is to produce beautiful
@@ -77,6 +113,7 @@ stdenv.mkDerivation rec {
77113
'';
78114
homepage = "https://sile-typesetter.org/";
79115
platforms = platforms.unix;
116+
maintainers = with maintainers; [ doronbehar ];
80117
license = licenses.mit;
81118
};
82119
}

0 commit comments

Comments
 (0)