igraph: use finalAttrs-based self-references

this allows overrideAttrs to work better
This commit is contained in:
Robert Scott 2023-08-23 22:35:07 +01:00
parent 483daed240
commit 75f5ea32fc

View file

@ -24,19 +24,19 @@ assert (blas.isILP64 == lapack.isILP64 &&
blas.isILP64 == arpack.isILP64 &&
!blas.isILP64);
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "igraph";
version = "0.10.6";
src = fetchFromGitHub {
owner = "igraph";
repo = pname;
rev = version;
repo = finalAttrs.pname;
rev = finalAttrs.version;
hash = "sha256-HNc+xU7Gcv9BSpb2OgyG9tCbk/dfWw5Ix1c2gvFZklE=";
};
postPatch = ''
echo "${version}" > IGRAPH_VERSION
echo "${finalAttrs.version}" > IGRAPH_VERSION
'';
outputs = [ "out" "dev" "doc" ];
@ -95,9 +95,9 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "C library for complex network analysis and graph theory";
homepage = "https://igraph.org/";
changelog = "https://github.com/igraph/igraph/blob/${src.rev}/CHANGELOG.md";
changelog = "https://github.com/igraph/igraph/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = licenses.gpl2Plus;
platforms = platforms.all;
maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
};
}
})