haskellPackages.cabal2nix-unstable: 2024-01-02 -> 2024-01-04

pandoc: install man pages from pandoc-cli tarball

The pandoc man pages moved from pandoc to pandoc-cli, so we need to
install them elsewhere. The install script for this was emitted by
cabal2nix which we now stop doing for pandoc >= 3.1.10 (so
haskellPackages.pandoc still has man pages). Instead we manually add an
override where it matters to us, namely
pkgs.pandoc (haskellPackages.pandoc-cli is lacking them now, not sure if
we need to care).
This commit is contained in:
sternenseemann 2024-01-04 16:57:20 +01:00
parent 065bd395b9
commit e0e903c391
3 changed files with 10 additions and 9 deletions

View File

@ -8,10 +8,10 @@
}:
mkDerivation {
pname = "cabal2nix";
version = "unstable-2024-01-02";
version = "unstable-2024-01-04";
src = fetchzip {
url = "https://github.com/NixOS/cabal2nix/archive/3f23ae1dda9a5bbe5f560e3cfe521efc9675f668.tar.gz";
sha256 = "12vlqiga5lmr38cf92khrk5f2r68swh5plxmbarqlc4bvw93prb3";
url = "https://github.com/NixOS/cabal2nix/archive/e394e96c51cc7a2858145e710fbedbb2cb57f6ec.tar.gz";
sha256 = "0rzmyx2i2z3w2ibg4rbaasq0581sa7bf8n1cih6v3j6phzgl3058";
};
postUnpack = "sourceRoot+=/cabal2nix; echo source root reset to $sourceRoot";
isLibrary = true;

View File

@ -224231,10 +224231,6 @@ self: {
base bytestring deepseq mtl tasty-bench text
];
doHaddock = false;
postInstall = ''
mkdir -p $out/share/man/man1
mv "man/"*.1 $out/share/man/man1/
'';
description = "Conversion between markup formats";
license = lib.licenses.gpl2Plus;
hydraPlatforms = lib.platforms.none;

View File

@ -1,4 +1,4 @@
{ stdenv, lib, haskellPackages, haskell, removeReferencesTo }:
{ stdenv, lib, haskellPackages, haskell, removeReferencesTo, installShellFiles }:
let
# Since pandoc 3.0 the pandoc binary resides in the pandoc-cli package.
@ -17,7 +17,10 @@ in
configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"];
buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed];
buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ];
buildTools = (drv.buildTools or []) ++ [
removeReferencesTo
installShellFiles
];
# Normally, the static linked executable shouldn't refer to any library or the compiler.
# This is not always the case when the dependency has Paths_* module generated by Cabal,
@ -39,6 +42,8 @@ in
'' + lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) ''
mkdir -p $out/share/bash-completion/completions
$out/bin/pandoc --bash-completion > $out/share/bash-completion/completions/pandoc
'' + ''
installManPage man/*
'';
}) static).overrideAttrs (drv: {
# These libraries are still referenced, because they generate