git.iko.soy/typeable/nixpkgs-stackage
on master help sign in
typeable/nixpkgs-stackage/examples/example-override.nix
20 lines 695 B history raw
1# Stackage packages accept `overrides` like Nixpkgs `haskellPackages`
3let
4 _pkgs = import <nixpkgs> {};
5 _stackageOverlay = _pkgs.fetchFromGitHub (_pkgs.lib.importJSON ./nixpkgs-stackage.json);
6 nixpkgs = import <nixpkgs> {
7 overlays = [ (import _stackageOverlay) ];
8 };
9 inherit (nixpkgs) pkgs lib haskell;
11 stackage2nixSrc = pkgs.fetchFromGitHub (lib.importJSON ./stackage2nix.json);
13 stackagePackages = haskell.packages.stackage.lib.callStackage2nix "stackage2nix" stackage2nixSrc { inherit nixpkgs; };
14 stackage = stackagePackages.override {
15 overrides = self: super: {
16 stackage2nix = haskell.lib.disableSharedExecutables super.stackage2nix;
17 };
18 };
19in
20 stackage