diff options
| -rw-r--r-- | default.nix | 14 | ||||
| -rw-r--r-- | shell.nix | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/default.nix b/default.nix index 52ecd20..1dc1708 100644 --- a/default.nix +++ b/default.nix | |||
| @@ -1,19 +1,21 @@ | |||
| 1 | { pkgs ? (import <nixpkgs> {}) | 1 | { pkgs ? (import <nixpkgs> {}) |
| 2 | , compilerName ? "ghc7103" | ||
| 2 | }: | 3 | }: |
| 3 | 4 | ||
| 4 | rec { | 5 | rec { |
| 5 | thermoprint-spec = pkgs.haskellPackages.callPackage ./spec/thermoprint-spec.nix {}; | 6 | haskellPackages = pkgs.haskell.packages."${compilerName}"; |
| 6 | thermoprint-bbcode = pkgs.haskellPackages.callPackage ./tp-bbcode/thermoprint-bbcode.nix { | 7 | thermoprint-spec = haskellPackages.callPackage ./spec/thermoprint-spec.nix {}; |
| 8 | thermoprint-bbcode = haskellPackages.callPackage ./tp-bbcode/thermoprint-bbcode.nix { | ||
| 7 | inherit bbcode thermoprint-spec; | 9 | inherit bbcode thermoprint-spec; |
| 8 | }; | 10 | }; |
| 9 | thermoprint-client = pkgs.haskellPackages.callPackage ./client/thermoprint-client.nix { | 11 | thermoprint-client = haskellPackages.callPackage ./client/thermoprint-client.nix { |
| 10 | inherit thermoprint-spec; | 12 | inherit thermoprint-spec; |
| 11 | }; | 13 | }; |
| 12 | thermoprint-server = pkgs.callPackage ./server/wrapped.nix { | 14 | thermoprint-server = pkgs.callPackage ./server/wrapped.nix { |
| 13 | inherit (pkgs.haskellPackages) ghcWithPackages; | 15 | inherit (haskellPackages) ghcWithPackages; |
| 14 | thermoprint-server = pkgs.haskellPackages.callPackage ./server/thermoprint-server.nix { | 16 | thermoprint-server = haskellPackages.callPackage ./server/thermoprint-server.nix { |
| 15 | inherit thermoprint-spec thermoprint-client; | 17 | inherit thermoprint-spec thermoprint-client; |
| 16 | }; | 18 | }; |
| 17 | }; | 19 | }; |
| 18 | bbcode = pkgs.haskellPackages.callPackage ./bbcode/bbcode.nix {}; | 20 | bbcode = haskellPackages.callPackage ./bbcode/bbcode.nix {}; |
| 19 | } | 21 | } |
| @@ -1,10 +1,10 @@ | |||
| 1 | { pkgs ? (import <nixpkgs> {}) | 1 | { pkgs ? (import <nixpkgs> {}) |
| 2 | , compilerName ? "ghc7103" | 2 | , haskellPackages ? (import ./default.nix {}).haskellPackages |
| 3 | }: | 3 | }: |
| 4 | 4 | ||
| 5 | let | 5 | let |
| 6 | thermoprintPackages = builtins.attrValues (import ./default.nix {}); | 6 | thermoprintPackages = builtins.attrValues (import ./default.nix {}); |
| 7 | ghc = pkgs.haskell.packages.${compilerName}.ghcWithPackages | 7 | ghc = haskellPackages.ghcWithPackages |
| 8 | (ps: thermoprintPackages ++ utilities ps ++ testDeps ps); | 8 | (ps: thermoprintPackages ++ utilities ps ++ testDeps ps); |
| 9 | utilities = (ps: with ps; [ hlint cabal2nix ]); | 9 | utilities = (ps: with ps; [ hlint cabal2nix ]); |
| 10 | testDeps = (ps: with ps; [ temporary hspec ]); | 10 | testDeps = (ps: with ps; [ temporary hspec ]); |
