aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2022-11-25 19:01:10 -0500
committerGitHub <noreply@github.com>2022-11-25 19:01:10 -0500
commitcc933b31fd23bb06e95bf41f848a1c99353d44ae (patch)
treeaf8288dbd4db2ad886d6b326bffb1c9d5b568de3 /default.nix
parent551e0384c923ff3ee98cfddf7e3eb42c6dbb2941 (diff)
downloadxesite-cc933b31fd23bb06e95bf41f848a1c99353d44ae.tar.xz
xesite-cc933b31fd23bb06e95bf41f848a1c99353d44ae.zip
Start version 3 (#573)
* Start version 3 * Change version to 3.0.0 in Cargo.toml * Add metadata for series * Change types for signal boosts * Add start of LaTeX resume generation at Nix time * Add start of proper author tagging for posts in JSONFeed and ldjson * Convert templates to use Maud * Add start of dynamic resume generation from dhall * Make patrons page embed thumbnails TODO: * [ ] Remove the rest of the old templates * [ ] Bring in Xeact for the share on mastodon button * [ ] Site update post Signed-off-by: Xe <me@christine.website> * fix nix builds Signed-off-by: Xe Iaso <me@christine.website> * fix dhall build Signed-off-by: Xe Iaso <me@christine.website> * fix non-flakes build Signed-off-by: Xe Iaso <me@christine.website> * make new mastodon share button Signed-off-by: Xe Iaso <me@christine.website> * remove the rest of the ructe templates that I can remove Signed-off-by: Xe Iaso <me@christine.website> * refactor blogposts to its own file Signed-off-by: Xe Iaso <me@christine.website> * move resume to be generated by nix Signed-off-by: Xe Iaso <me@christine.website> * write article Signed-off-by: Xe Iaso <me@christine.website> * blog/site-update-v3: hero image Signed-off-by: Xe Iaso <me@christine.website> * add site update series tag to site updates Signed-off-by: Xe Iaso <me@christine.website> Signed-off-by: Xe <me@christine.website> Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix67
1 files changed, 10 insertions, 57 deletions
diff --git a/default.nix b/default.nix
index 5ce17c1..2cccff2 100644
--- a/default.nix
+++ b/default.nix
@@ -1,57 +1,10 @@
-{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { } }:
-with pkgs;
-
-let
- rust = pkgs.callPackage ./nix/rust.nix { };
-
- srcNoTarget = dir:
- builtins.filterSource
- (path: type: type != "directory" || builtins.baseNameOf path != "target")
- dir;
-
- naersk = pkgs.callPackage sources.naersk {
- rustc = rust;
- cargo = rust;
- };
- dhallpkgs = import sources.easy-dhall-nix { inherit pkgs; };
- src = srcNoTarget ./.;
-
- xesite = naersk.buildPackage {
- inherit src;
- doCheck = true;
- buildInputs = [ pkg-config openssl git ];
- remapPathPrefix = true;
- };
-
- config = stdenv.mkDerivation {
- pname = "xesite-config";
- version = "HEAD";
- buildInputs = [ pkgs.dhall ];
-
- phases = "installPhase";
-
- installPhase = ''
- cd ${src}
- dhall resolve < ${src}/config.dhall >> $out
- '';
- };
-
-in pkgs.stdenv.mkDerivation {
- inherit (xesite) name;
- inherit src;
- phases = "installPhase";
-
- installPhase = ''
- mkdir -p $out $out/bin
-
- cp -rf ${config} $out/config.dhall
- cp -rf $src/blog $out/blog
- cp -rf $src/css $out/css
- cp -rf $src/data $out/data
- cp -rf $src/gallery $out/gallery
- cp -rf $src/static $out/static
- cp -rf $src/talks $out/talks
-
- cp -rf ${xesite}/bin/xesite $out/bin/xesite
- '';
-}
+(import
+ (
+ let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
+ fetchTarball {
+ url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
+ sha256 = lock.nodes.flake-compat.locked.narHash;
+ }
+ )
+ { src = ./.; }
+).defaultNix