depot/third_party/nixpkgs/pkgs/by-name/al/almo/package.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

51 lines
1 KiB
Nix

{
lib,
fetchFromGitHub,
stdenv,
gcc,
python312Packages,
}:
let
version = "0.9.5-alpha";
in
stdenv.mkDerivation {
pname = "almo";
inherit version;
src = fetchFromGitHub {
owner = "abap34";
repo = "almo";
rev = "refs/tags/v${version}";
sha256 = "sha256-Cz+XDJmdp+utzwm1c7ThTNS6kfNF6r4B16tnGQSCVMc=";
};
buildInputs = [
gcc
python312Packages.pybind11
];
makeFlags = [ "all" ];
# remove darwin-only linker flag on linux
postPatch = lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace scripts/pybind.sh \
--replace-fail " -undefined dynamic_lookup" ""
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/lib
cp build/almo $out/bin
cp almo.so $out/lib
runHook postInstall
'';
meta = {
description = "ALMO is markdown parser and static site generator";
license = lib.licenses.mit;
platforms = lib.platforms.all;
homepage = "https://github.com/abap34/almo";
maintainers = with lib.maintainers; [ momeemt ];
mainProgram = "almo";
};
}