Merge pull request #224663 from wegank/restinio-refactor

restinio: refactor
This commit is contained in:
Weijia Wang 2023-04-05 09:07:41 +03:00 committed by GitHub
commit 7dba85e9f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,19 +1,23 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchurl }:
let
stdenvNoCC.mkDerivation rec {
pname = "restinio";
version = "0.6.17";
in
fetchzip {
name = "${pname}-${version}";
url = "https://github.com/Stiffstream/restinio/releases/download/v.${version}/${pname}-${version}.tar.bz2";
hash = "sha256-8A13r3Qsn5S+kVWLPENoOjqz2tPMxSo6EWBvHG1cTAE=";
stripRoot = false;
postFetch = ''
src = fetchurl {
url = "https://github.com/Stiffstream/restinio/releases/download/v.${version}/${pname}-${version}.tar.bz2";
hash = "sha256-zqDEaQYZbpfDCyv++/1JV4yfhwqJUB185c05u9N2FCo=";
};
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/include
mv $out/restinio-*/dev/restinio $out/include
rm -r $out/restinio-*
mv restinio-*/dev/restinio $out/include
runHook postInstall
'';
meta = with lib; {