sile: Pick up the darwin lua fixes so sile will work
This commit is contained in:
parent
ca2607f418
commit
3c6e7fb246
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nix;
|
package = pkgs.nix;
|
||||||
|
useSandbox = true;
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
@ -71,8 +72,6 @@
|
|||||||
with pkgs; [
|
with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
tmux
|
tmux
|
||||||
inputs.runwhen
|
|
||||||
inputs.durnitisp
|
|
||||||
gnumake
|
gnumake
|
||||||
# TODO find a version of the julia package that will install
|
# TODO find a version of the julia package that will install
|
||||||
# on darwin and add it as an overlay
|
# on darwin and add it as an overlay
|
||||||
@ -81,7 +80,6 @@
|
|||||||
git
|
git
|
||||||
mercurial
|
mercurial
|
||||||
bash
|
bash
|
||||||
# inputs.buildah
|
|
||||||
curl
|
curl
|
||||||
wget
|
wget
|
||||||
jq
|
jq
|
||||||
@ -90,10 +88,12 @@
|
|||||||
watch
|
watch
|
||||||
iterm2
|
iterm2
|
||||||
go
|
go
|
||||||
inputs.sile
|
|
||||||
htop
|
htop
|
||||||
colima
|
colima
|
||||||
lima
|
lima
|
||||||
|
inputs.sile
|
||||||
|
inputs.runwhen
|
||||||
|
inputs.durnitisp
|
||||||
# TODO add sonic-pi here if it supports the arch
|
# TODO add sonic-pi here if it supports the arch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
54
nix/darwin/flake.lock
generated
54
nix/darwin/flake.lock
generated
@ -132,21 +132,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_5": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1649676176,
|
|
||||||
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"naersk": {
|
"naersk": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
@ -199,15 +184,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650155902,
|
"lastModified": 1653328845,
|
||||||
"narHash": "sha256-UFqkwGceA/CGNbWSleACF/KTTosDzk/8ESjRV3Y70S0=",
|
"narHash": "sha256-NKc98+iX8YH500np1zWZSQ2C+FoD9sS/nuH02Rg2ats=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "03cec787b418eafe42dd061fe6d972fd97b17fb3",
|
"rev": "7ae60dd7068478db5d936a3850b6df859aec21d0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
|
"ref": "22.05-beta",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -241,28 +227,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1651545648,
|
|
||||||
"narHash": "sha256-7f1JYFHtfTOvois5LdXrKXthjb6rE9i8ZxWDQyzYKAk=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "24c33ab7952544ad355d0677c9eea931b23f371c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"durnitisp": "durnitisp",
|
"durnitisp": "durnitisp",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"runwhen": "runwhen",
|
"runwhen": "runwhen",
|
||||||
"rust-overlay": "rust-overlay_2",
|
"rust-overlay": "rust-overlay_2"
|
||||||
"sile": "sile"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runwhen": {
|
"runwhen": {
|
||||||
@ -329,21 +300,6 @@
|
|||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"sile": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils_5",
|
|
||||||
"nixpkgs": "nixpkgs_5"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"narHash": "sha256-5JapwZZF3DBmVXtyK8gzDgaquNMgzS8l5+nR8lMm9uk=",
|
|
||||||
"path": "./../sile",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"path": "./../sile",
|
|
||||||
"type": "path"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# TODO(jwall): Use the oxalica rust overlay here
|
# TODO(jwall): Pinning this to a fixed version of lua on darwin for now.
|
||||||
nixpkgs.url = "github:nixos/nixpkgs";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=22.05-beta";
|
||||||
darwin.url = "github:lnl7/nix-darwin";
|
darwin.url = "github:lnl7/nix-darwin";
|
||||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
runwhen.url = "github:zaphar/runwhen";
|
runwhen.url = "github:zaphar/runwhen";
|
||||||
@ -11,10 +11,9 @@
|
|||||||
url = "github:oxalica/rust-overlay";
|
url = "github:oxalica/rust-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
sile.url = "path:./../sile";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {self, nixpkgs, darwin, runwhen, durnitisp, rust-overlay, sile }:
|
outputs = {self, nixpkgs, darwin, runwhen, durnitisp, rust-overlay }:
|
||||||
let
|
let
|
||||||
forSystem = (system:
|
forSystem = (system:
|
||||||
let
|
let
|
||||||
@ -29,8 +28,8 @@
|
|||||||
runwhen = runwhen.defaultPackage."${system}";
|
runwhen = runwhen.defaultPackage."${system}";
|
||||||
durnitisp = durnitisp.defaultPackage."${system}";
|
durnitisp = durnitisp.defaultPackage."${system}";
|
||||||
rust-overlay = rust-overlay.overlay;
|
rust-overlay = rust-overlay.overlay;
|
||||||
buildah = pkgs.buildah;
|
#TODO(jwall): when the libtexpdf issue is fixed we can stop doing this
|
||||||
sile = sile.defaultPackage."${system}";
|
sile = pkgs.sile.overrideAttrs(oldAttrs: { doCheck = false; });
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
|
41
nix/sile/flake.lock
generated
41
nix/sile/flake.lock
generated
@ -1,41 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-utils": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1649676176,
|
|
||||||
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1651545648,
|
|
||||||
"narHash": "sha256-7f1JYFHtfTOvois5LdXrKXthjb6rE9i8ZxWDQyzYKAk=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "24c33ab7952544ad355d0677c9eea931b23f371c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "nixpkgs";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = {self, nixpkgs, flake-utils}:
|
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
sile = with pkgs; callPackage ./package.nix { };
|
|
||||||
in {
|
|
||||||
defaultPackage = sile;
|
|
||||||
});
|
|
||||||
}
|
|
@ -1,117 +0,0 @@
|
|||||||
{ lib, stdenv
|
|
||||||
, darwin
|
|
||||||
, fetchurl
|
|
||||||
, makeBinaryWrapper
|
|
||||||
, pkg-config
|
|
||||||
, poppler_utils
|
|
||||||
, gitMinimal
|
|
||||||
, harfbuzz
|
|
||||||
, icu
|
|
||||||
, fontconfig
|
|
||||||
, lua
|
|
||||||
, libiconv
|
|
||||||
, makeFontsConf
|
|
||||||
, gentium
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
luaEnv = lua.withPackages(ps: with ps; [
|
|
||||||
cassowary
|
|
||||||
cosmo
|
|
||||||
compat53
|
|
||||||
linenoise
|
|
||||||
lpeg
|
|
||||||
lua-zlib
|
|
||||||
lua_cliargs
|
|
||||||
luaepnf
|
|
||||||
luaexpat
|
|
||||||
luafilesystem
|
|
||||||
luarepl
|
|
||||||
luasec
|
|
||||||
luasocket
|
|
||||||
luautf8
|
|
||||||
penlight
|
|
||||||
stdlib
|
|
||||||
vstruct
|
|
||||||
]);
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "sile";
|
|
||||||
version = "0.12.5";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/sile-typesetter/sile/releases/download/v${version}/${pname}-${version}.tar.xz";
|
|
||||||
sha256 = "0z9wdiqwarysh3lhxss3w53vq58ml46bdi9ymr853kfl7m4gz5yy";
|
|
||||||
};
|
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
"--with-system-luarocks"
|
|
||||||
"--with-manual"
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
gitMinimal
|
|
||||||
pkg-config
|
|
||||||
makeBinaryWrapper
|
|
||||||
];
|
|
||||||
buildInputs = [
|
|
||||||
harfbuzz
|
|
||||||
icu
|
|
||||||
fontconfig
|
|
||||||
libiconv
|
|
||||||
luaEnv
|
|
||||||
]
|
|
||||||
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit
|
|
||||||
;
|
|
||||||
checkInputs = [
|
|
||||||
poppler_utils
|
|
||||||
];
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
patchShebangs build-aux/*.sh
|
|
||||||
'' + lib.optionalString stdenv.isDarwin ''
|
|
||||||
sed -i -e 's|@import AppKit;|#import <AppKit/AppKit.h>|' src/macfonts.m
|
|
||||||
'';
|
|
||||||
|
|
||||||
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework AppKit";
|
|
||||||
|
|
||||||
FONTCONFIG_FILE = makeFontsConf {
|
|
||||||
fontDirectories = [
|
|
||||||
gentium
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
#TODO(jwall): Eventually we shouldn't need this anymore
|
|
||||||
#doCheck = true;
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
preBuild = lib.optionalString stdenv.cc.isClang ''
|
|
||||||
substituteInPlace libtexpdf/dpxutil.c \
|
|
||||||
--replace "ASSERT(ht && ht->table && iter);" "ASSERT(ht && iter);"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Hack to avoid TMPDIR in RPATHs.
|
|
||||||
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
|
|
||||||
|
|
||||||
outputs = [ "out" "doc" "man" "dev" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A typesetting system";
|
|
||||||
longDescription = ''
|
|
||||||
SILE is a typesetting system; its job is to produce beautiful
|
|
||||||
printed documents. Conceptually, SILE is similar to TeX—from
|
|
||||||
which it borrows some concepts and even syntax and
|
|
||||||
algorithms—but the similarities end there. Rather than being a
|
|
||||||
derivative of the TeX family SILE is a new typesetting and
|
|
||||||
layout engine written from the ground up using modern
|
|
||||||
technologies and borrowing some ideas from graphical systems
|
|
||||||
such as InDesign.
|
|
||||||
'';
|
|
||||||
homepage = "https://sile-typesetter.org";
|
|
||||||
changelog = "https://github.com/sile-typesetter/sile/raw/v${version}/CHANGELOG.md";
|
|
||||||
platforms = platforms.unix;
|
|
||||||
license = licenses.mit;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user