Verified Commit 14ea02d0 authored by doshitan's avatar doshitan

Drop content-src nix derivation

No longer needed to support the correct dates in the nix build since the
dates are embedded in the content files now.
parent 0f7fba32
......@@ -11,50 +11,6 @@ in rec {
doshitan-css-exec = (pkgs.callPackage ./content/assets/clay {}).css-exec;
doshitan-css = (pkgs.callPackage ./content/assets/clay {}).css;
content-src = pkgs.stdenv.mkDerivation rec {
name = "doshitan-site-content-src-${version}";
version = "0.0.0";
srcs = [
(./makefile)
(./scripts)
(builtins.path { name = "git"; path = ./.git; })
(pkgs.lib.contentCleanSource ./content)
];
sourceRoot = ".";
buildInputs = ciInputs;
# the default unpacker doesn't understand single files that aren't archives,
# so copy the main makefile manually, then remove it from the srcs list to
# skip it in the default unpackPhase
#
# https://github.com/NixOS/nixpkgs/blob/ec9cf578e56ff7c3045878f86506338b0112777d/pkgs/stdenv/generic/setup.sh#L805
preUnpack = ''
cp $(echo $srcs | cut -d ' ' -f 1) ./makefile
srcs=$(echo $srcs | cut -d ' ' -f2-)
'';
# clean up some of our unpacks
# - gitignore source filter sets the path name to `source`, unconditionally, so set where to look for content
# https://github.com/hercules-ci/gitignore.nix/pull/11
# - the git directory needs to be .git
postUnpack = ''
mv source content
mv git .git
'';
patchPhase = ''
patchShebangs ./scripts/*
'';
buildPhase = ''
make metadata-gen
'';
installPhase = ''
cp -a content/. $out
'';
};
contentBuildInputs = [ pkgs.gnumake pkgs.elmPackages.elm pkgs.nodePackages.uglify-js pkgs.nodejs build-search-index ];
contentLunrFile = "${pkgs.contentNodeRuntimeEnv}/lib/node_modules/lunr/lunr.js";
content = pkgs.stdenv.mkDerivation rec {
......@@ -62,7 +18,7 @@ in rec {
version = "0.0.0";
srcs = [
(./makefile)
content-src
(pkgs.lib.contentCleanSource ./content)
];
unpackPhase = ''
cp $(echo $srcs | cut -d ' ' -f 1) ./makefile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment