feat: add a nix default
This commit is contained in:
parent
84c1042296
commit
27ff50e75a
1 changed files with 44 additions and 0 deletions
44
default.nix
Normal file
44
default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
description = "Nix flake to use indieweb static files as a theme for website deployment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages = rec {
|
||||
indiewebTheme = pkgs.stdenv.mkDerivation {
|
||||
pname = "indieweb-theme";
|
||||
version = "1.0.0";
|
||||
|
||||
src = ./.;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/themes/indieweb
|
||||
cp -r archetypes theme.toml layouts static $out/themes/indieweb
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Static files for the indieweb theme to be used in the website deployment";
|
||||
homepage = "https://your-homepage-url";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.yourname ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
defaultPackage.${system} = self.packages.${system}.indiewebTheme;
|
||||
|
||||
apps = rec {
|
||||
indiewebTheme = flake-utils.lib.mkApp { drv = self.packages.${system}.indiewebTheme; };
|
||||
default = indiewebTheme;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue