-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdefault.nix
More file actions
31 lines (26 loc) · 799 Bytes
/
Copy pathdefault.nix
File metadata and controls
31 lines (26 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { }, makeWrapper ? pkgs.makeWrapper }:
let
srcNoTarget = dir:
builtins.filterSource
(path: type: type != "directory" || builtins.baseNameOf path != "target")
dir;
gruvbox-css = import sources.gruvbox-css { };
naersk = pkgs.callPackage sources.naersk { };
src = srcNoTarget ./.;
pfacts = naersk.buildPackage {
inherit src;
remapPathPrefix = true;
};
in pkgs.stdenv.mkDerivation {
name = pfacts.name;
version = pfacts.version;
inherit src;
phases = "installPhase";
buildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/public
cp -rf $src/templates $out/templates
cp -rf ${pfacts}/bin $out/bin
cp -rf ${gruvbox-css}/gruvbox.css $out/public/gruvbox.css
'';
}