diff options
Diffstat (limited to '')
-rw-r--r-- | flake.nix | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/flake.nix b/flake.nix index 57b49a1..5e4e91b 100644 --- a/flake.nix +++ b/flake.nix @@ -7,9 +7,7 @@ crane = { url = "github:ipetkov/crane"; - inputs = { - nixpkgs.follows = "nixpkgs"; - }; + inputs = {}; }; rust-overlay = { url = "github:oxalica/rust-overlay"; @@ -98,31 +96,28 @@ system: let pkgs = nixpkgs.legacyPackages.${system}; treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;}; - build = pkgs.stdenv.mkDerivation { - pname = "b-peetz.de"; - version = "v1.0"; + + build = pkgs.callPackage ./package.nix {inherit essay facharbeit;}; + check = pkgs.stdenv.mkDerivation { + # Add the source name, to force this to rerun. + name = "zola-check-${./src}"; src = ./src; + # Allow network access for link checking + outputHash = "sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY="; + outputHashMode = "recursive"; + # Run local preferLocalBuild = true; allowSubstitutes = false; - nativeBuildInputs = []; - buildPhase = '' - install -D ${essay.outputs.packages."${system}".default}/philosophy/kant_and_free_software.pdf ./writings/philosophy/kant_and_free_software.pdf - # NOTE: This link is for backward compatibility, as I have given out links with that url <2024-07-13> - ln --symbolic --relative ./writings/philosophy/kant_and_free_software.pdf ./dead-trees/kant_and_free_software.pdf - ln --symbolic --relative ./writings/philosophy/kant_and_free_software.pdf ./dead-trees/philosophy/kant_and_free_software.pdf + nativeBuildInputs = [pkgs.zola pkgs.findutils]; - install -D ${facharbeit.outputs.packages."${system}".default}/chemistry/facharbeit.pdf ./writings/chemistry/facharbeit.pdf - # NOTE: This link is for backward compatibility, as I have given out links with that url <2024-07-13> - ln --symbolic --relative ./writings/chemistry/facharbeit.pdf ./dead-trees/raman_spectrometer.pdf - ln --symbolic --relative ./writings/chemistry/facharbeit.pdf ./dead-trees/chemistry/facharbeit.pdf - ''; - installPhase = '' - install -d $out/ - cp --recursive . $out/ + buildPhase = '' + zola check ''; + + installPhase = "touch $out"; }; in { packages = { @@ -130,7 +125,7 @@ }; checks = { - inherit build; + inherit build check; formatting = treefmtEval.config.build.check self; }; @@ -138,7 +133,9 @@ devShells = { default = pkgs.mkShell { - packages = []; + packages = [ + pkgs.zola + ]; }; }; } |