mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
54 lines
1.9 KiB
Nix
54 lines
1.9 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, autoreconfHook
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "robodoc";
|
|
version = "4.99.44";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gumpu";
|
|
repo = "ROBODoc";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-l3prSdaGhOvXmZfCPbsZJNocO7y20zJjLQpajRTJOqE=";
|
|
};
|
|
|
|
postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
substituteInPlace Docs/makefile.am \
|
|
--replace 'man1_MANS = robodoc.1 robohdrs.1' 'man1_MANS ='
|
|
'';
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/gumpu/ROBODoc";
|
|
description = "Documentation Extraction Tool";
|
|
longDescription = ''
|
|
ROBODoc is program documentation tool. The idea is to include for every
|
|
function or procedure a standard header containing all sorts of
|
|
information about the procedure or function. ROBODoc extracts these
|
|
headers from the source file and puts them in a separate
|
|
autodocs-file. ROBODoc thus allows you to include the program
|
|
documentation in the source code and avoid having to maintain two separate
|
|
documents. Or as Petteri puts it: "robodoc is very useful - especially for
|
|
programmers who don't like writing documents with Word or some other
|
|
strange tool."
|
|
|
|
ROBODoc can format the headers in a number of different formats: HTML,
|
|
RTF, LaTeX, or XML DocBook. In HTML mode it can generate cross links
|
|
between headers. You can even include parts of your source code.
|
|
|
|
ROBODoc works with many programming languages: For instance C, Pascal,
|
|
Shell Scripts, Assembler, COBOL, Occam, Postscript, Forth, Tcl/Tk, C++,
|
|
Java -- basically any program in which you can use remarks/comments.
|
|
'';
|
|
license = with licenses; gpl3Plus;
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
platforms = platforms.all;
|
|
};
|
|
})
|