-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
43 lines (35 loc) · 1.38 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
37
38
39
40
41
42
43
let
pkgs = import (fetchTarball {
url = "https://github.com/NixOS/nixpkgs/tarball/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778";
sha256 = "09ammqxzqydj97lk5iwrlg4xnj7b2pnhj6qpxa0pbp9z0651yvz6";
}) {
config = {};
overlays = [];
};
inherit (pkgs) lib;
hlib = pkgs.haskell.lib;
hpkgs = pkgs.haskell.packages.ghc882.override (old: {
overrides = lib.composeExtensions (old.overrides or (self: super: {})) (self: super: {
on-demand-minecraft = self.callCabal2nix "on-demand-minecraft" (lib.sourceByRegex ./. [
"^app.*"
"^lib.*"
"^tests.*"
"^.*\\.cabal$"
]) {};
socket-activation = hlib.unmarkBroken (hlib.doJailbreak (hlib.appendPatch super.socket-activation (pkgs.fetchpatch {
# https://github.com/ddfisher/haskell-socket-activation/pull/6
url = "https://github.com/ddfisher/haskell-socket-activation/commit/7e33b1f89e2eb7c4b6fd92fdbd89a65e93c25d3a.patch";
sha256 = "1ih2y9gwi7ywa21mm497kgkynabd7y0pvwivfrgd9p84rw01haq3";
})));
polysemy = self.callHackage "polysemy" "1.3.0.0" {};
polysemy-plugin = hlib.doJailbreak (hlib.unmarkBroken super.polysemy-plugin);
});
});
env = hpkgs.shellFor {
packages = p: [ p.on-demand-minecraft ];
nativeBuildInputs = [ hpkgs.cabal-install ];
};
pkg = hpkgs.on-demand-minecraft;
in hlib.justStaticExecutables pkg // {
inherit env hpkgs;
}