refactor(blog): Use callPackage to import derivation

This commit is contained in:
Vincent Ambo 2019-09-02 16:53:54 +01:00
parent 6472b2645c
commit 99ee84b477
2 changed files with 4 additions and 4 deletions

View file

@ -25,7 +25,7 @@ let
localPkgs = self: super: {
# Local projects should be added here:
tazjin = {
blog = import ./services/tazblog { pkgs = self; };
blog = self.callPackage ./services/tazblog {};
blog_cli = self.callPackage ./tools/blog_cli {};
gemma = self.callPackage ./services/gemma {};
};

View file

@ -2,10 +2,10 @@
#
# tazblog.nix was generated using cabal2nix.
{ pkgs ? import <nixpkgs> {} }:
{ writeShellScriptBin, haskell }:
let tazblog = pkgs.haskell.packages.ghc865.callPackage ./tazblog.nix {};
in pkgs.writeShellScriptBin "tazblog" ''
let tazblog = haskell.packages.ghc865.callPackage ./tazblog.nix {};
in writeShellScriptBin "tazblog" ''
export PORT=8000
export RESOURCE_DIR=${./static}
exec ${tazblog}/bin/tazblog