mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 02:05:51 +03:00
cppreference-doc: refactor, fix version
This commit is contained in:
parent
6ca1fd3038
commit
efd77d0bc5
@ -1,22 +1,23 @@
|
||||
{ lib, fetchzip }:
|
||||
{ lib, stdenvNoCC, fetchurl }:
|
||||
|
||||
let
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "cppreference-doc";
|
||||
version = "2022.07.30";
|
||||
ver = builtins.replaceStrings ["."] [""] version;
|
||||
version = "20220730";
|
||||
|
||||
in fetchzip {
|
||||
name = pname + "-" + version;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/PeterFeicht/${pname}/releases/download/v${version}/html-book-${version}.tar.xz";
|
||||
hash = "sha256-cfFQA8FouNxaAMuvGbZICps+h6t+Riqjnttj11EcAos=";
|
||||
};
|
||||
|
||||
url = "https://github.com/PeterFeicht/${pname}/releases/download/v${ver}/html-book-${ver}.tar.xz";
|
||||
sha256 = "sha256-gsYNpdxbWnmwcC9IJV1g+e0/s4Hoo5ig1MGoYPIHspw=";
|
||||
sourceRoot = ".";
|
||||
|
||||
stripRoot = false;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
postFetch = ''
|
||||
rm $out/cppreference-doxygen-local.tag.xml $out/cppreference-doxygen-web.tag.xml
|
||||
mkdir -p $out/share/cppreference/doc
|
||||
mv $out/reference $out/share/cppreference/doc/html
|
||||
mv reference $out/share/cppreference/doc/html
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = { inherit pname version; };
|
||||
|
Loading…
Reference in New Issue
Block a user