-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
48 lines (41 loc) · 1.53 KB
/
shell.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
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, gi-gtk, gi-webkit2, haskell-gi-base, haskell, gi-javascriptcore_4_0_6
, protolude, stdenv, base, bytestring, containers, gi-atk, gi-cairo, gi-gdk,
gi-gio, gi-glib, gi-gobject, gi-soup, text, transformers, callPackage, hsass,
optparse-generic, temporary
}:
let
gi-webkit2-fixed = haskell.lib.overrideCabal gi-webkit2 (drv:
{
libraryHaskellDepends = [
base bytestring containers gi-atk gi-cairo gi-gdk gi-gio gi-glib
gi-gobject gi-gtk gi-javascriptcore_4_0_6 gi-soup haskell-gi-base text
transformers
];
});
gi-webkit2webextension = callPackage ./gi-webkit2webextension.nix {
gi-javascriptcore = gi-javascriptcore_4_0_6;
webkitgtk = pkgs.webkitgtk;
webkit2gtk = null;
};
in mkDerivation {
pname = "gluon";
version = "0.0.1";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
gi-gtk gi-webkit2-fixed haskell-gi-base protolude gi-webkit2webextension
hsass optparse-generic temporary
];
license = stdenv.lib.licenses.unfree;
libraryPkgconfigDepends = [ pkgs.webkitgtk ];
};
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
drv = haskellPackages.callPackage f {};
in
if pkgs.lib.inNixShell then drv.env else drv