gnuchess: refactor

This commit is contained in:
Felix Buehler 2021-12-19 18:27:53 +01:00
parent 79c0393baf
commit f6cc37608d
2 changed files with 14 additions and 22 deletions

View file

@ -1,23 +1,17 @@
{lib, stdenv, fetchurl, flex, makeWrapper}: { lib, stdenv, fetchurl, flex, makeWrapper }:
let
s = # Generated upstream information stdenv.mkDerivation rec {
rec { pname = "gnuchess";
baseName="gnuchess"; version = "6.2.9";
version="6.2.9";
name="${baseName}-${version}"; src = fetchurl {
url="mirror://gnu/chess/${name}.tar.gz"; url = "mirror://gnu/chess/gnuchess-${version}.tar.gz";
sha256="sha256-3fzCC911aQCpq2xCx9r5CiiTv38ZzjR0IM42uuvEGJA="; sha256 = "sha256-3fzCC911aQCpq2xCx9r5CiiTv38ZzjR0IM42uuvEGJA=";
}; };
buildInputs = [ buildInputs = [
flex flex
]; ];
in
stdenv.mkDerivation {
inherit (s) name version;
src = fetchurl {
inherit (s) url sha256;
};
inherit buildInputs;
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
postInstall = '' postInstall = ''
@ -25,11 +19,10 @@ stdenv.mkDerivation {
wrapProgram $out/bin/gnuchessu --set PATH "$out/bin" wrapProgram $out/bin/gnuchessu --set PATH "$out/bin"
''; '';
meta = { meta = with lib; {
inherit (s) version;
description = "GNU Chess engine"; description = "GNU Chess engine";
maintainers = [lib.maintainers.raskin]; maintainers = with maintainers; [ raskin ];
platforms = lib.platforms.unix; platforms = platforms.unix;
license = lib.licenses.gpl3Plus; license = licenses.gpl3Plus;
}; };
} }

View file

@ -1 +0,0 @@
url https://ftp.gnu.org/gnu/chess/