diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-12-09 09:06:14 +0100 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-12-09 09:06:14 +0100 |
commit | 1b56431115a54228f27ae573d9f64d57502ff639 (patch) | |
tree | b63cdd14d08a33a7764a3bd55a8e82af90bcd67b | |
parent | 0c69ef6214a9e69424e1fd481a78e91990782be0 (diff) | |
download | dirty-haskell.org-1b56431115a54228f27ae573d9f64d57502ff639.tar dirty-haskell.org-1b56431115a54228f27ae573d9f64d57502ff639.tar.gz dirty-haskell.org-1b56431115a54228f27ae573d9f64d57502ff639.tar.bz2 dirty-haskell.org-1b56431115a54228f27ae573d9f64d57502ff639.tar.xz dirty-haskell.org-1b56431115a54228f27ae573d9f64d57502ff639.zip |
Site binary need not depend on site contents
-rw-r--r-- | default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/default.nix b/default.nix index 629f1bb..ec776eb 100644 --- a/default.nix +++ b/default.nix | |||
@@ -1,7 +1,11 @@ | |||
1 | { pkgs ? (import <nixpkgs> {}) | 1 | { pkgs ? (import <nixpkgs> {}) |
2 | }: | 2 | }: |
3 | |||
4 | with pkgs.lib; | ||
3 | 5 | ||
4 | rec { | 6 | let |
7 | sourceFilter = path: type: ((hasSuffix ".hs" path) || (baseNameOf path == "src") || (baseNameOf path == "blog.cabal")); | ||
8 | in rec { | ||
5 | haskellPackages = pkgs.haskellPackages.override { | 9 | haskellPackages = pkgs.haskellPackages.override { |
6 | overrides = self : super : { | 10 | overrides = self : super : { |
7 | hakyll = pkgs.haskell.lib.overrideCabal super.hakyll (drv: { | 11 | hakyll = pkgs.haskell.lib.overrideCabal super.hakyll (drv: { |
@@ -11,7 +15,7 @@ rec { | |||
11 | }; | 15 | }; |
12 | dirty-haskell = pkgs.stdenv.lib.overrideDerivation (haskellPackages.callPackage ./blog.nix {}) | 16 | dirty-haskell = pkgs.stdenv.lib.overrideDerivation (haskellPackages.callPackage ./blog.nix {}) |
13 | (attrs : | 17 | (attrs : |
14 | { src = ./.; | 18 | { src = builtins.filterSource sourceFilter ./.; |
15 | shellHook = '' | 19 | shellHook = '' |
16 | export PROMPT_INFO=${attrs.name} | 20 | export PROMPT_INFO=${attrs.name} |
17 | ''; | 21 | ''; |