Commit 9763971a authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

slweb: 0.9.0 -> 0.10.1

parent 246b34fa
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -2,36 +2,34 @@
  lib,
  stdenv,
  fetchFromSourcehut,
  redo-apenwarr,
  testers,
  versionCheckHook,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "slweb";
  version = "0.9.0";
  version = "0.10.1";

  src = fetchFromSourcehut {
    owner = "~strahinja";
    repo = "slweb";
    rev = "v${finalAttrs.version}";
    hash = "sha256-QDHcp5pCmapgOlJpDDyyC12JOfh/biDyF6O+iKGbOGg=";
    hash = "sha256-AJg8qgbNUKizU0uyTnq9EviIXOUuaGvQowLAyTWhGTY=";
  };

  nativeBuildInputs = [ redo-apenwarr ];

  installPhase = ''
    runHook preInstall
    export FALLBACKVER=${finalAttrs.version}
    PREFIX=$out redo install
    runHook postInstall
  postPatch = ''
    substituteInPlace config.mk \
      --replace-fail "/usr/local" "$out"
  '';

  enableParallelBuilding = true;

  passthru.tests.version = testers.testVersion {
    package = finalAttrs.finalPackage;
  env = {
    FALLBACKVER = finalAttrs.version;
  };

  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  doInstallCheck = true;

  meta = {
    description = "Static website generator which aims at being simplistic";
    homepage = "https://strahinja.srht.site/slweb/";