move packages to own file
This commit is contained in:
parent
cec95952d2
commit
59465cc961
55
flake.nix
55
flake.nix
|
@ -23,60 +23,7 @@
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = forAllSystems (
|
packages = forAllSystems (import ./packages.nix);
|
||||||
{ pkgs, ... }:
|
|
||||||
rec {
|
|
||||||
hugo-theme-poison = pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "hugo-theme-poison";
|
|
||||||
homepage = "https://poison.lukeorth.com/";
|
|
||||||
version = "";
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "lukeorth";
|
|
||||||
repo = "poison";
|
|
||||||
rev = "07485e85f0247518bc64ed0cc6fd6b39abe3d90d";
|
|
||||||
hash = "sha256-NQN4u6rBjw+zC7NuDUFg9LUuuvIR7Ed22UIs2jcZtkQ=";
|
|
||||||
};
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -r * $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
zerforschen-plus-content = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "zerforschen-plus-content";
|
|
||||||
|
|
||||||
# Source directory containing your Hugo project
|
|
||||||
src = ./.;
|
|
||||||
|
|
||||||
# Build dependencies
|
|
||||||
nativeBuildInputs = [
|
|
||||||
pkgs.hugo
|
|
||||||
];
|
|
||||||
|
|
||||||
preBuildPhase = ''
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Build phase - run Hugo to generate the site
|
|
||||||
buildPhase = ''
|
|
||||||
# Copy in theme before building website
|
|
||||||
mkdir -p themes/poison
|
|
||||||
cp -r ${hugo-theme-poison}/* themes/poison/
|
|
||||||
|
|
||||||
hugo
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Install phase - copy the public directory to the output
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -r public/* $out/
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
default = zerforschen-plus-content;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
devShells = forAllSystems (
|
devShells = forAllSystems (
|
||||||
{ pkgs, system, ... }:
|
{ pkgs, system, ... }:
|
||||||
|
|
49
packages.nix
Normal file
49
packages.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
rec {
|
||||||
|
hugo-theme-poison = pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "hugo-theme-poison";
|
||||||
|
homepage = "https://poison.lukeorth.com/";
|
||||||
|
version = "";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "lukeorth";
|
||||||
|
repo = "poison";
|
||||||
|
rev = "07485e85f0247518bc64ed0cc6fd6b39abe3d90d";
|
||||||
|
hash = "sha256-NQN4u6rBjw+zC7NuDUFg9LUuuvIR7Ed22UIs2jcZtkQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r * $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
zerforschen-plus-content = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "zerforschen-plus-content";
|
||||||
|
|
||||||
|
# Source directory containing your Hugo project
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
# Build dependencies
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkgs.hugo
|
||||||
|
];
|
||||||
|
|
||||||
|
# Build phase - run Hugo to generate the site
|
||||||
|
buildPhase = ''
|
||||||
|
# Copy in theme before building website
|
||||||
|
mkdir -p themes/poison
|
||||||
|
cp -r ${hugo-theme-poison}/* themes/poison/
|
||||||
|
|
||||||
|
hugo
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Install phase - copy the public directory to the output
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r public/* $out/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
default = zerforschen-plus-content;
|
||||||
|
}
|
Loading…
Reference in a new issue