From bfd87658efa8097b58e0672ce8c3b1bec49e752a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 21 Dec 2021 12:10:50 +0100 Subject: [PATCH] conspy: refactor --- pkgs/os-specific/linux/conspy/default.nix | 44 +++++++++---------- .../os-specific/linux/conspy/default.upstream | 5 --- 2 files changed, 20 insertions(+), 29 deletions(-) delete mode 100644 pkgs/os-specific/linux/conspy/default.upstream diff --git a/pkgs/os-specific/linux/conspy/default.nix b/pkgs/os-specific/linux/conspy/default.nix index 480962024f7e..12e7f798e79e 100644 --- a/pkgs/os-specific/linux/conspy/default.nix +++ b/pkgs/os-specific/linux/conspy/default.nix @@ -1,25 +1,21 @@ -{lib, stdenv, fetchurl, autoconf, automake, ncurses}: -let - s = # Generated upstream information - rec { - baseName="conspy"; - version="1.16"; - name="${baseName}-${version}"; - hash="02andak806vd04bgjlr0y0d2ddx7cazyf8nvca80vlh8x94gcppf"; - url="mirror://sourceforge/project/conspy/conspy-1.16-1/conspy-1.16.tar.gz"; - sha256="02andak806vd04bgjlr0y0d2ddx7cazyf8nvca80vlh8x94gcppf"; - }; - buildInputs = [ - autoconf automake ncurses - ]; -in -stdenv.mkDerivation { - inherit (s) name version; - inherit buildInputs; +{ lib, stdenv, fetchurl, autoconf, automake, ncurses }: + +stdenv.mkDerivation rec { + pname = "conspy"; + version = "1.16"; + src = fetchurl { - inherit (s) url sha256; + url = "mirror://sourceforge/project/conspy/conspy-${version}-1/conspy-${version}.tar.gz"; + sha256 = "02andak806vd04bgjlr0y0d2ddx7cazyf8nvca80vlh8x94gcppf"; curlOpts = " -A application/octet-stream "; }; + + buildInputs = [ + autoconf + automake + ncurses + ]; + preConfigure = '' touch NEWS echo "EPL 1.0" > COPYING @@ -27,11 +23,11 @@ stdenv.mkDerivation { automake --add-missing autoconf ''; - meta = { - inherit (s) version; + + meta = with lib; { description = "Linux text console viewer"; - license = lib.licenses.epl10 ; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.linux; + license = licenses.epl10; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; }; } diff --git a/pkgs/os-specific/linux/conspy/default.upstream b/pkgs/os-specific/linux/conspy/default.upstream deleted file mode 100644 index 3f9ff3e4a820..000000000000 --- a/pkgs/os-specific/linux/conspy/default.upstream +++ /dev/null @@ -1,5 +0,0 @@ -url https://sourceforge.net/projects/conspy/files/ -version_link 'conspy-[-0-9.]+/$' -version_link '[-0-9.]+[.]tar[.][a-z0-9]+/download$' -SF_redirect -version '.*-([-0-9.]+)[.]tar[.].*' '\1'