Skip to content

Instantly share code, notes, and snippets.

@neongreen
Last active November 9, 2019 22:15
Show Gist options
  • Save neongreen/91e67546056a4ae1074a0589789949ec to your computer and use it in GitHub Desktop.
Save neongreen/91e67546056a4ae1074a0589789949ec to your computer and use it in GitHub Desktop.
nix-shell with custom Haskell packages
with import <nixpkgs> { };
let
proto3-wire-src = fetchFromGitHub {
owner = "awakenetworks";
repo = "proto3-wire";
rev = "4f355bbac895d577d8a28f567ab4380f042ccc24";
sha256 = "16l1rnnygwk1b2sb3l6klhr6ad0wvry204icxnc81c6rbzbk6rqc";
};
proto3-suite-src = fetchFromGitHub {
owner = "awakenetworks";
repo = "proto3-suite";
rev = "3f6dd6f612cf2eba3c05798926ff924b0d5ab4fa";
sha256 = "0g7j7axx9rkrzw32ky9xl08zj34rx4mqafd89lrpnsi8lcq2z06j";
};
hs = haskellPackages.override {
overrides = self: super: rec {
proto3-wire = haskell.lib.dontCheck
(self.callCabal2nix "proto3-wire" proto3-wire-src { });
proto3-suite = haskell.lib.dontCheck
(self.callCabal2nix "proto3-suite" proto3-suite-src { });
};
};
in
runCommand "dummy" {
buildInputs = [ (hs.ghcWithPackages (p: [p.proto3-suite])) ];
GHC_ENVIRONMENT = "-";
} ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment