forked from islandoftex/arara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
63 lines (55 loc) · 2.06 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# WARNING: This flake is for development purposes only. Do not attempt
# to build arara with it (see #113), it is broken in a currently-won't-fix
# status, although you are welcome to provide us with a working Nix build.
# If you want to build arara, please use gradle as documented. The Nix
# development shell will pull in all relevant packages for your build
# environment.
{
description = "arara - the cool TeX automation tool";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, flake-utils, nixpkgs }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
defaultPackage =
with import nixpkgs { inherit system; };
pkgs.stdenv.mkDerivation rec {
pname = "arara";
# This version corresponds to the major version of arara.
# If a more granular adjustment is needed, please raise an issue.
# see also https://gitlab.com/islandoftex/arara/-/issues/97
version = "7.0.0";
src = ./.;
nativeBuildInputs = [ pkgs.jdk8 pkgs.gradle ];
buildPhase = ''
export GRADLE_USER_HOME=$PWD
./gradlew --no-daemon :cli:shadowJar
'';
installPhase = ''
mkdir -p $out/bin
cp cli/build/libs/arara-cli-with-deps*.jar $out/bin/arara.jar
'';
meta = with pkgs.lib; {
homepage = "https://gitlab.com/islandoftex/arara";
description = "arara is a TeX automation tool based on rules and directives. It gives you a way to enhance your TeX experience.";
license = licenses.bsd3;
};
};
devShell = pkgs.mkShell {
inputsFrom = builtins.attrValues self.defaultPackage;
buildInputs = with pkgs; [
htmlq
nixpkgs-fmt
python3Packages.weasyprint
zip
zola
];
};
}
);
}