From d99cf9b42e8833a3909095bfffb5be195d729b0f Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 17 Sep 2023 21:22:40 -0300 Subject: [PATCH] libisoburn: refactor - fetchFromGitea - finalAttrs - split output - meta.changelog --- .../libraries/libisoburn/default.nix | 56 +++++++++++++++---- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/libisoburn/default.nix b/pkgs/development/libraries/libisoburn/default.nix index c3fb4a053864..03db8b4d39f4 100644 --- a/pkgs/development/libraries/libisoburn/default.nix +++ b/pkgs/development/libraries/libisoburn/default.nix @@ -1,22 +1,54 @@ -{ lib, stdenv, fetchurl, acl, attr, zlib, libburn, libisofs }: +{ lib +, stdenv +, fetchFromGitea +, acl +, attr +, autoreconfHook +, libburn +, libisofs +, pkg-config +, zlib +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libisoburn"; version = "1.5.6"; - src = fetchurl { - url = "http://files.libburnia-project.org/releases/${pname}-${version}.tar.gz"; - sha256 = "sha256-K4Cm9z3WM6XSQ/rL6XoV5cmgdkSl4aJCwhm5N1pF9xs="; + src = fetchFromGitea { + domain = "dev.lovelyhq.com"; + owner = "libburnia"; + repo = "libisoburn"; + rev = "release-${finalAttrs.version}"; + hash = "sha256-16qNVlWFVXfvbte5EgP/u193wK2GV/r22hVX0SZWr+0="; }; - buildInputs = [ attr zlib libburn libisofs ]; - propagatedBuildInputs = [ acl ]; + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; - meta = with lib; { + buildInputs = [ + attr + zlib + libburn + libisofs + ]; + + propagatedBuildInputs = [ + acl + ]; + + outputs = [ "out" "lib" "dev" "info" "man" ]; + + strictDeps = true; + + meta = { homepage = "http://libburnia-project.org/"; description = "Enables creation and expansion of ISO-9660 filesystems on CD/DVD/BD "; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ vrthra ]; - platforms = with platforms; linux; + changelog = "https://dev.lovelyhq.com/libburnia/libisoburn/src/tag/${finalAttrs.src.rev}/ChangeLog"; + license = lib.licenses.gpl2Plus; + mainProgram = "osirrox"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + inherit (libisofs.meta) platforms; }; -} +})