dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
site/git/stagit/default.nix (979B)
1{pkgs}: let
2 python = pkgs.python3.withPackages (ps:
3 with ps; [
4 pygments
5 nh3
6 markdown
7 pymdown-extensions
8 (buildPythonPackage rec {
9 pname = "markdown_callouts";
10 version = "0.4.0";
11 pyproject = true;
12 build-system = [hatchling];
13 dependencies = [markdown];
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-ftLJBIaWcFinOlR3gRIZg4OVItZwQa5SxJeWFvGyt0Y=";
17 };
18 })
19 ]);
20in
21 pkgs.stdenv.mkDerivation {
22 pname = "stagit";
23 version = "1.2-custom";
24 src = ./.;
25 buildInputs = [pkgs.libgit2];
26 nativeBuildInputs = [pkgs.makeWrapper];
27 makeFlags = [
28 "PREFIX=$(out)"
29 "STAGIT_CFLAGS=-I${pkgs.libgit2.dev}/include"
30 "STAGIT_LDFLAGS=-lgit2"
31 ];
32 postInstall = ''
33 sed -i '1c #!${python}/bin/python3' "$out/bin/render"
34 wrapProgram "$out/bin/stagit" --prefix PATH : "$out/bin"
35 '';
36 meta.mainProgram = "stagit";
37 }