From e7876ed40261ea7a0905fa82f0aab4277c34cb8f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 21 Dec 2021 13:14:43 +0100 Subject: [PATCH] mi2ly: fix build and refactor --- pkgs/applications/audio/mi2ly/default.nix | 41 ++++++++----------- .../applications/audio/mi2ly/default.upstream | 3 -- 2 files changed, 16 insertions(+), 28 deletions(-) delete mode 100644 pkgs/applications/audio/mi2ly/default.upstream diff --git a/pkgs/applications/audio/mi2ly/default.nix b/pkgs/applications/audio/mi2ly/default.nix index b4f7668394f1..9a046a2e11aa 100644 --- a/pkgs/applications/audio/mi2ly/default.nix +++ b/pkgs/applications/audio/mi2ly/default.nix @@ -1,28 +1,20 @@ -{lib, stdenv, fetchurl}: -let - s = # Generated upstream information - rec { - baseName="mi2ly"; - version="0.12"; - name="${baseName}-${version}"; - hash="1b14zcwlvnxhjxr3ymyzg0mg4sbijkinzpxm641s859jxcgylmll"; - url="https://download.savannah.gnu.org/releases/mi2ly/mi2ly.0.12.tar.bz2"; - sha256="1b14zcwlvnxhjxr3ymyzg0mg4sbijkinzpxm641s859jxcgylmll"; - }; - buildInputs = [ - ]; -in -stdenv.mkDerivation { - inherit (s) name version; - inherit buildInputs; +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "mi2ly"; + version = "0.12"; + src = fetchurl { - inherit (s) url sha256; + url = "https://download.savannah.gnu.org/releases/mi2ly/mi2ly.${version}.tar.bz2"; + sha256 = "sha256-lFbqH+syFaQDMbXfb+OUcWnyKnjfVz9yl7DbTTn7JKw="; }; - sourceRoot="."; + sourceRoot = "."; hardeningDisable = [ "format" ]; + NIX_CFLAGS_COMPILE = [ "-fgnu89-inline" ]; + buildPhase = "./cc"; installPhase = '' mkdir -p "$out"/{bin,share/doc/mi2ly} @@ -30,12 +22,11 @@ stdenv.mkDerivation { cp README Doc.txt COPYING Manual.txt "$out/share/doc/mi2ly" ''; - meta = { - inherit (s) version; + meta = with lib; { description = "MIDI to Lilypond converter"; - license = lib.licenses.gpl2Plus ; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.linux; - broken = true; # 2018-04-11 + license = licenses.gpl2Plus; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; + homepage = "https://www.nongnu.org/mi2ly/"; }; } diff --git a/pkgs/applications/audio/mi2ly/default.upstream b/pkgs/applications/audio/mi2ly/default.upstream deleted file mode 100644 index 0b2607989aa2..000000000000 --- a/pkgs/applications/audio/mi2ly/default.upstream +++ /dev/null @@ -1,3 +0,0 @@ -url https://download.savannah.gnu.org/releases/mi2ly/ -ensure_choice -version '.*/mi2ly[.]([0-9.]+)[.]tar.*' '\1'