Skip to content

Instantly share code, notes, and snippets.

@vaibhavsagar
Created June 15, 2019 15:28
Show Gist options
  • Save vaibhavsagar/212273a6af6896fb79dd2c866b03ce5a to your computer and use it in GitHub Desktop.
Save vaibhavsagar/212273a6af6896fb79dd2c866b03ce5a to your computer and use it in GitHub Desktop.
A `default.nix` for Semantic
let
nixpkgs-src = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs-channels/archive/f197f57bd336746b53e5f1668ac7df1b63da7c9f.tar.gz";
sha256 = "0cj4h39fhrm0nzxgfcjxy457zhi2rajpgm6abas816srmr4bb6nn";
};
semantic-src = builtins.fetchTarball {
url = "https://github.com/github/semantic/archive/78dad094fa2380aef36cabd48d57f6122f1034ec.tar.gz";
sha256 = "0bk7f96fm9928nc2yv85cwchk43xh4yikbiqg7ngba5q6gj7xy04";
};
pkgs = import nixpkgs-src { config.allowBroken = true; };
proto3-suite-src = builtins.fetchTarball {
url = "https://github.com/joshvera/proto3-suite/archive/83f3352f0c7c94ea091e6087f60692eda9991fae.tar.gz";
sha256 = "0xrv9f2g1l7wfrh4dk5096jwwiqqxcli16a69iza39lh0vq6sv8h";
};
proto3-wire-src = builtins.fetchTarball {
url = "https://github.com/joshvera/proto3-wire/archive/84664e22f01beb67870368f1f88ada5d0ad01f56.tar.gz";
sha256 = "10v5pw99xw3iwi53zqv40165v6wrk7fjz21fifpynbgxygad1j43";
};
haskellPackages = pkgs.haskellPackages.override {
all-cabal-hashes = pkgs.fetchurl {
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/7831970c314c25bbe13c59eb857a7c30180a459e.tar.gz";
sha256 = "1kxbmli3bqv85alpqj2gyn2hlsywqyyrbkhfih2bby2i3i4ibbl3";
};
overrides = self: super: {
fastsum = self.callHackage "fastsum" "0.1.1.0" {};
fused-effects = self.callHackage "fused-effects" "0.4.0.0" {};
fused-effects-exceptions = self.callHackage "fused-effects-exceptions" "0.1.1.0" {};
Glob = self.callHackage "Glob" "0.10.0" {};
haskeline = self.callHackage "haskeline" "0.7.5.0" {};
heap = pkgs.haskell.lib.dontCheck super.heap;
hedgehog = self.callHackage "hedgehog" "1.0" {};
http-client = self.callHackage "http-client" "0.6.4" {};
parsers = self.callHackage "parsers" "0.12.10" {};
proto3-suite = pkgs.haskell.lib.dontCheck (self.callCabal2nix "proto3-suite" proto3-suite-src {});
proto3-wire = pkgs.haskell.lib.dontCheck (self.callCabal2nix "proto3-wire" proto3-wire-src {});
range-set-list = pkgs.haskell.lib.dontCheck super.range-set-list;
semantic-core = pkgs.haskell.lib.dontCheck (self.callCabal2nix "semantic-core" semantic-src/semantic-core {});
semantic = pkgs.haskell.lib.dontHaddock (pkgs.haskell.lib.dontCheck (self.callCabal2nix "semantic" semantic-src {}));
semilattices = pkgs.haskell.lib.dontCheck super.semilattices;
tasty-hedgehog = self.callHackage "tasty-hedgehog" "1.0.0.1" {};
tree-sitter = self.callHackage "tree-sitter" "0.1.0.0" {};
tree-sitter-go = self.callHackage "tree-sitter-go" "0.1.0.0" {};
tree-sitter-haskell = self.callHackage "tree-sitter-haskell" "0.1.0.0" {};
tree-sitter-json = self.callHackage "tree-sitter-json" "0.1.0.0" {};
tree-sitter-php = self.callHackage "tree-sitter-php" "0.1.0.0" {};
tree-sitter-python = self.callHackage "tree-sitter-python" "0.1.0.1" {};
tree-sitter-ruby = self.callHackage "tree-sitter-ruby" "0.1.0.0" {};
tree-sitter-typescript = self.callHackage "tree-sitter-typescript" "0.1.0.0" {};
tree-sitter-tsx = self.callHackage "tree-sitter-tsx" "0.1.0.0" {};
tree-sitter-java = self.callHackage "tree-sitter-java" "0.1.0.0" {};
unordered-containers = self.callHackage "unordered-containers" "0.2.10.0" {};
};
};
in haskellPackages.semantic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment