You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
710 B
26 lines
710 B
{ sources ? import ./nix/sources.nix, pkgs ? import <nixpkgs> { } }: |
|
let |
|
srcNoTarget = dir: |
|
builtins.filterSource |
|
(path: type: type != "directory" || builtins.baseNameOf path != "target") |
|
dir; |
|
naersk = pkgs.callPackage sources.naersk { }; |
|
gruvbox-css = pkgs.callPackage sources.gruvbox-css { }; |
|
src = srcNoTarget ./.; |
|
pfacts = naersk.buildPackage { |
|
inherit src; |
|
remapPathPrefix = true; |
|
}; |
|
in pkgs.stdenv.mkDerivation { |
|
inherit (pfacts) name; |
|
inherit src; |
|
phases = "installPhase"; |
|
|
|
installPhase = '' |
|
mkdir -p $out/static |
|
|
|
cp -rf $src/templates $out/templates |
|
cp -rf ${pfacts}/bin $out/bin |
|
cp -rf ${gruvbox-css}/gruvbox.css $out/static/gruvbox.css |
|
''; |
|
}
|
|
|