@@ -20,23 +20,22 @@ curl https://nixos.org/nix/install | sh | |||||
### Installing | ### Installing | ||||
Enter the build environment | |||||
``` | |||||
nix-shell --attr env rf.nix | |||||
``` | |||||
Compile the generator | Compile the generator | ||||
``` | ``` | ||||
nix-build rf.nix | nix-build rf.nix | ||||
``` | ``` | ||||
Enter the build environment | |||||
``` | |||||
nix-shell --pure rf.nix | |||||
``` | |||||
Generate the site | Generate the site | ||||
``` | ``` | ||||
./result/site clean | |||||
./result/site build | |||||
./result/site rebuild | |||||
``` | ``` | ||||
And test it out | And test it out | ||||
@@ -1,14 +1,11 @@ | |||||
{ mkDerivation, base, binary, filepath, hakyll, hakyll-favicon, imagemagick | |||||
, stdenv | |||||
}: | |||||
{ mkDerivation, base, filepath, hakyll, hakyll-favicon, stdenv }: | |||||
mkDerivation { | mkDerivation { | ||||
pname = "rf"; | pname = "rf"; | ||||
version = "0.1.3.1"; | version = "0.1.3.1"; | ||||
src = ./.; | src = ./.; | ||||
isLibrary = false; | isLibrary = false; | ||||
isExecutable = true; | isExecutable = true; | ||||
executableHaskellDepends = [ base binary filepath hakyll hakyll-favicon ]; | |||||
#executableSystemDepends = [ imagemagick ]; | |||||
executableHaskellDepends = [ base filepath hakyll hakyll-favicon ]; | |||||
homepage = "regularflolloping.com"; | homepage = "regularflolloping.com"; | ||||
description = "tA's blog"; | description = "tA's blog"; | ||||
license = stdenv.lib.licenses.bsd3; | license = stdenv.lib.licenses.bsd3; | ||||
@@ -1,4 +1,17 @@ | |||||
let | let | ||||
pkgs = import <nixpkgs> { }; | |||||
config = { | |||||
packageOverrides = pkgs: rec { | |||||
haskellPackages = pkgs.haskellPackages.override { | |||||
overrides = haskellPackagesNew: haskellPackagesOld: rec { | |||||
rf = | |||||
haskellPackagesNew.callPackage ./default.nix { }; | |||||
}; | |||||
}; | |||||
}; | |||||
}; | |||||
pkgs = import <nixpkgs> { inherit config; }; | |||||
in | in | ||||
pkgs.haskellPackages.callPackage ./default.nix { } | |||||
rec { | |||||
inherit pkgs; | |||||
rf = pkgs.haskellPackages.rf; | |||||
} |
@@ -0,0 +1,5 @@ | |||||
let | |||||
stuff = import ./rf.nix; | |||||
in stuff.rf.env.overrideAttrs (drv: { | |||||
buildInputs = drv.buildInputs ++ [ stuff.pkgs.imagemagick ]; | |||||
}) |