Created
July 31, 2016 03:32
-
-
Save dalaing/fcb90c21856cc4d1d6a9395d9f480ebc to your computer and use it in GitHub Desktop.
Multi-project nix files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }: | |
let | |
inherit (nixpkgs) pkgs; | |
haskellPackages = if compiler == "default" | |
then pkgs.haskellPackages | |
else pkgs.haskell.packages.${compiler}; | |
drv = haskellPackages.callPackage ./. {}; | |
in | |
if pkgs.lib.inNixShell then drv.env else drv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }: | |
let | |
inherit (nixpkgs) pkgs; | |
haskellPackages = if compiler == "default" | |
then pkgs.haskellPackages | |
else pkgs.haskell.packages.${compiler}; | |
modifiedHaskellPackages = haskellPackages.override { | |
overrides = self: super: { | |
language-input = self.callPackage ../language-input {}; | |
language-output = self.callPackage ./. {}; | |
}; | |
}; | |
drv = modifiedHaskellPackages.language-output; | |
in | |
if pkgs.lib.inNixShell then drv.env else drv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment