From 4dcb3055bc93fa73d94c055a6ef1a8497ac1ed10 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 14 Oct 2024 13:54:43 +0200 Subject: [PATCH] libqglviewer: clean Co-authored-by: Niklas Korz <590517+niklaskorz@users.noreply.github.com> --- .../libraries/libqglviewer/default.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/libqglviewer/default.nix b/pkgs/development/libraries/libqglviewer/default.nix index ec2234bb9a28..6b8457f2a60c 100644 --- a/pkgs/development/libraries/libqglviewer/default.nix +++ b/pkgs/development/libraries/libqglviewer/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchurl, qmake, qtbase, libGLU, AGL }: +{ lib, stdenv, fetchFromGitHub, qmake, qtbase, libGLU, AGL }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libqglviewer"; version = "2.9.1"; - src = fetchurl { - url = "http://www.libqglviewer.com/src/libQGLViewer-${version}.tar.gz"; - sha256 = "sha256-J4+DKgstPvvg1pUhGd+8YFh5C3oPGHaQmDfLZzzkP/M="; + src = fetchFromGitHub { + owner = "GillesDebunne"; + repo = "libQGLViewer"; + tag = "v${finalAttrs.version}"; + hash = "sha256-T8KAcw3cXbp0FZm53OjlQBnUvLRFdoj80dIQzQY0/yw="; }; nativeBuildInputs = [ qmake ]; @@ -19,10 +21,10 @@ stdenv.mkDerivation rec { cd QGLViewer ''; - meta = with lib; { + meta = { description = "C++ library based on Qt that eases the creation of OpenGL 3D viewers"; - homepage = "http://libqglviewer.com"; - license = licenses.gpl2; - platforms = platforms.all; + homepage = "https://github.com/GillesDebunne/libQGLViewer"; + license = lib.licenses.gpl2; + platforms = lib.platforms.all; }; -} +})