-
Notifications
You must be signed in to change notification settings - Fork 5
/
default.nix
37 lines (36 loc) · 1 KB
/
default.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
{ pkgs ? import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/1a88aa9e0cd.tar.gz";
sha256 = "076zlppa0insiv9wklk4h45m7frq1vfs43vsa11l8bm5i5qxzk6r";
}) {}
}:
with pkgs.haskell.lib;
let
julia_pkgconfig = pkgs.writeTextFile {
name = "prefix";
text = ''
exec_prefix=''${prefix}
libdir=''${exec_prefix}/lib
includedir=''${prefix}/include/julia
Name: Julia
Description: Julia
URL: https://julia-lang.org
Version: 1.1
Libs: -L''${libdir} -ljulia
Cflags: -I''${includedir}
Requires:
'';
};
julia =
pkgs.lib.overrideDerivation pkgs.julia_11 (drv: {
postInstall = ''
mkdir -p $out/lib/pkgconfig
echo "$out" > $out/lib/pkgconfig/julia.pc
echo "prefix=$out" >> $out/lib/pkgconfig/julia.pc
cat ${julia_pkgconfig} >> $out/lib/pkgconfig/julia.pc
'';
});
julio = addExtraLibrary (pkgs.haskellPackages.callPackage ./pkg.nix {
inherit julia;
}) pkgs.libuv;
in
julio