Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{ lib, buildPythonPackage, fetchFromGitHub, sphinx }:

buildPythonPackage rec {
pname = "sphinxcontrib-log-cabinet";
version = "1.0.1";
format = "setuptools";

src = fetchFromGitHub {
owner = "davidism";
repo = "sphinxcontrib-log-cabinet";
rev = "refs/tags/${version}";
sha256 = "03cxspgqsap9q74sqkdx6r6b4gs4hq6dpvx4j58hm50yfhs06wn1";
};

propagatedBuildInputs = [ sphinx ];

pythonImportsCheck = [ "sphinxcontrib.log_cabinet" ];

doCheck = false; # no tests

meta = with lib; {
homepage = "https://github.com/davidism/sphinxcontrib-log-cabinet";
description = "Sphinx extension to organize changelogs";
license = licenses.mit;
maintainers = with maintainers; [ kaction ];
};
}
64 changes: 64 additions & 0 deletions pkgs/development/tools/misc/deheader/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{ lib, stdenv, python3, xmlto, docbook-xsl-nons, fetchFromGitLab }:

stdenv.mkDerivation rec {
pname = "deheader";
version = "1.8";
outputs = [ "out" "man" ];

src = fetchFromGitLab {
owner = "esr";
repo = "deheader";
rev = "${version}";
sha256 = "sha256-sjxgUtdsi/sfxOViDj7l8591TSYwtCzDQcHsk9ClXuM=";
};

buildInputs = [ python3 ];

nativeBuildInputs = [ xmlto docbook-xsl-nons ];

# With upstream Makefile, xmlto is called without "--skip-validation". It
# makes it require a lot of dependencies, yet ultimately it fails
# nevertheless in attempt to fetch something from SourceForge.
buildPhase = ''
runHook preBuild

xmlto man --skip-validation deheader.xml
patchShebangs ./deheader

runHook postBuild
'';

# Normally "foundMakefile" variable is set by default buildPhase.
foundMakefile = 1;
doCheck = true;

installPhase = ''
runHook preInstall

mkdir -p $out/{bin,share/man/man1}
install -m 755 ./deheader $out/bin
install -m 644 ./deheader.1 $out/share/man/man1

runHook postInstall
'';

meta = with lib; {
description = "Tool to find and optionally remove unneeded includes in C or C++ source files";
longDescription = ''
This tool takes a list of C or C++ sourcefiles and generates a report
on which #includes can be omitted from them -- the test, for each foo.c
or foo.cc or foo.cpp, is simply whether 'rm foo.o; make foo.o' returns a
zero status. Optionally, with the -r option, the unneeded headers are removed.
The tool also reports on headers required for strict portability.
'';
homepage = "http://catb.org/~esr/deheader";
changelog = "https://gitlab.com/esr/deheader/-/blob/master/NEWS.adoc";
license = licenses.bsd2;
maintainers = with maintainers; [ kaction ];

# Single-file python3 script is probably unix-portable, but I am not
# interested in dealing with anything but linux; feel free to add yourself
# as another maintainer if you are. ~kaction, 2022-08-25
platforms = platforms.linux;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3580,6 +3580,8 @@ with pkgs;

dedup = callPackage ../tools/backup/dedup { };

deheader = callPackage ../development/tools/misc/deheader { };

dehydrated = callPackage ../tools/admin/dehydrated { };

deja-dup = callPackage ../applications/backup/deja-dup { };
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10354,6 +10354,8 @@ in {

sphinxcontrib-katex = callPackage ../development/python-modules/sphinxcontrib-katex { };

sphinxcontrib-log-cabinet = callPackage ../development/python-modules/sphinxcontrib-log-cabinet { };

sphinxcontrib-nwdiag = callPackage ../development/python-modules/sphinxcontrib-nwdiag { };

sphinxcontrib_newsfeed = callPackage ../development/python-modules/sphinxcontrib_newsfeed { };
Expand Down