Skip to content

Instantly share code, notes, and snippets.

@ixmatus
Created May 24, 2017 22:19
Show Gist options
  • Save ixmatus/7615f25d702479ca95a1df2618164d8c to your computer and use it in GitHub Desktop.
Save ixmatus/7615f25d702479ca95a1df2618164d8c to your computer and use it in GitHub Desktop.
let config = import ./config.nix;
in
{ pkgs ? import <nixpkgs> { inherit config; } }:
let
darwinPkgs = import <nixpkgs> { inherit config; system = "x86_64-darwin"; };
linuxPkgs = import <nixpkgs> { inherit config; system = "x86_64-linux" ; };
pkgs = import <nixpkgs> { inherit config; };
in
{ mypackage-linux = linuxPkgs.haskellPackages.mypackage;
mypackage-darwin = darwinPkgs.haskellPackages.mypackage;
mypackage = pkgs.haskellPackages.mypackage;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment