Flakeify vampysite
This commit is contained in:
parent
8197987031
commit
1fb32cc4d3
|
@ -1,12 +1,12 @@
|
|||
{ rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
name = "bin";
|
||||
pname = "bin";
|
||||
version = "3bbd64611f2a5dee91528976f6db17ff9844315a";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "WantGuns";
|
||||
repo = name;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0lyx8n4rpnyd7c6yjx8aa3zwxlfwj3db0ykrxdvlsaw4wrqlfk7i";
|
||||
};
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
version = "10768ce069f5c08e8e4393c494f0c6900922170c";
|
||||
repo = pkgs.fetchgit {
|
||||
url = "https://git.lain.faith/sorceress/vampysite.git";
|
||||
rev = version;
|
||||
sha256 = "1lniwqyhj6r3pwwd4qp01yhfxjbwclw5dn58dgf4kk45f9qgniy3";
|
||||
};
|
||||
|
||||
patched_pkgs = import (builtins.fetchTarball {
|
||||
url =
|
||||
"https://github.com/AgathaSorceress/nixpkgs/tarball/image-optim-pack-cleanup";
|
||||
sha256 = "03jskd96vplfcyj5d8wsb1v4m73vgzn4sr8l24cnlrp5zvpjl5v7";
|
||||
}) { inherit (pkgs) config; };
|
||||
|
||||
jekyll_env = patched_pkgs.bundlerEnv {
|
||||
name = "jekyll_env";
|
||||
inherit (pkgs) ruby;
|
||||
|
||||
gemdir = "${repo}/.";
|
||||
};
|
||||
image_optim_deps = with pkgs; [
|
||||
pngout
|
||||
advancecomp
|
||||
optipng
|
||||
pngquant
|
||||
jhead
|
||||
jpegoptim
|
||||
jpeg-archive
|
||||
libjpeg
|
||||
];
|
||||
in pkgs.stdenv.mkDerivation {
|
||||
inherit version;
|
||||
name = "vampysite";
|
||||
|
||||
src = repo;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
jekyll_env
|
||||
# nokogiri dependencies
|
||||
zlib
|
||||
libiconv
|
||||
libxml2
|
||||
libxslt
|
||||
# jekyll wants a JS runtime
|
||||
nodejs-slim
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
export PATH="${lib.escapeShellArg (lib.makeBinPath image_optim_deps)}":$PATH
|
||||
|
||||
bundle exec jekyll build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r _site/* $out/
|
||||
'';
|
||||
}
|
71
flake.lock
71
flake.lock
|
@ -558,6 +558,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_11": {
|
||||
"locked": {
|
||||
"lastModified": 1682092588,
|
||||
"narHash": "sha256-NjKBPnScpbGiH/YOx74DIFOVkr5AKJOVZoy0l7J58gk=",
|
||||
"owner": "AgathaSorceress",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bdd3dc5aa8435b66f14636550223a9b3a50e534d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "AgathaSorceress",
|
||||
"ref": "image-optim-pack-cleanup",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681002951,
|
||||
|
@ -728,7 +744,8 @@
|
|||
"home-manager": "home-manager",
|
||||
"mms": "mms",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"url-eater": "url-eater"
|
||||
"url-eater": "url-eater",
|
||||
"vampysite": "vampysite"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
@ -799,6 +816,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"url-eater": {
|
||||
"inputs": {
|
||||
"naersk": "naersk_3",
|
||||
|
@ -869,6 +901,43 @@
|
|||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vampysite": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_11",
|
||||
"utils": "utils_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682093832,
|
||||
"narHash": "sha256-qMqCrkJ8CT7AtIgjuRQwXMGLyndhKKBWY3BuDI6ujnc=",
|
||||
"ref": "refs/heads/mistress",
|
||||
"rev": "0a248079330351ac57f3aba6c4389f4e17c01e91",
|
||||
"revCount": 15,
|
||||
"type": "git",
|
||||
"url": "https://git.lain.faith/sorceress/vampysite"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.lain.faith/sorceress/vampysite"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -20,11 +20,12 @@
|
|||
colmena.url = "github:AgathaSorceress/colmena";
|
||||
|
||||
frq-friend.url = "git+https://git.xenua.me/xenua/fedi-frq-friend";
|
||||
vampysite.url = "git+https://git.lain.faith/sorceress/vampysite";
|
||||
|
||||
helix.url = "github:helix-editor/helix";
|
||||
};
|
||||
outputs = { nixpkgs, home-manager, mms, helix, url-eater, colorpickle
|
||||
, frq-friend, colmena, ... }: {
|
||||
, frq-friend, colmena, vampysite, ... }: {
|
||||
colmena = {
|
||||
network = {
|
||||
description = "Agatha's Nix Infra";
|
||||
|
@ -36,6 +37,7 @@
|
|||
helix = helix.packages.${final.system}.default;
|
||||
colorpickle = colorpickle.packages.${final.system}.default;
|
||||
frq-friend = frq-friend.defaultPackage.${final.system};
|
||||
vampysite = vampysite.packages.${final.system}.default;
|
||||
})
|
||||
colmena.overlay
|
||||
];
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
bin = final.callPackage ../../common/pkgs/bin.nix { };
|
||||
vampysite = final.callPackage ../../common/pkgs/vampysite.nix { };
|
||||
})
|
||||
(final: prev: { bin = final.callPackage ../../common/pkgs/bin.nix { }; })
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
|
|
Loading…
Reference in New Issue