gnuchess: refactor

+14 -22
+14 -21
pkgs/games/gnuchess/default.nix
··· 1 - {lib, stdenv, fetchurl, flex, makeWrapper}: 2 - let 3 - s = # Generated upstream information 4 - rec { 5 - baseName="gnuchess"; 6 - version="6.2.9"; 7 - name="${baseName}-${version}"; 8 - url="mirror://gnu/chess/${name}.tar.gz"; 9 - sha256="sha256-3fzCC911aQCpq2xCx9r5CiiTv38ZzjR0IM42uuvEGJA="; 10 }; 11 buildInputs = [ 12 flex 13 ]; 14 - in 15 - stdenv.mkDerivation { 16 - inherit (s) name version; 17 - src = fetchurl { 18 - inherit (s) url sha256; 19 - }; 20 - inherit buildInputs; 21 nativeBuildInputs = [ makeWrapper ]; 22 23 postInstall = '' ··· 25 wrapProgram $out/bin/gnuchessu --set PATH "$out/bin" 26 ''; 27 28 - meta = { 29 - inherit (s) version; 30 description = "GNU Chess engine"; 31 - maintainers = [lib.maintainers.raskin]; 32 - platforms = lib.platforms.unix; 33 - license = lib.licenses.gpl3Plus; 34 }; 35 }
··· 1 + { lib, stdenv, fetchurl, flex, makeWrapper }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "gnuchess"; 5 + version = "6.2.9"; 6 + 7 + src = fetchurl { 8 + url = "mirror://gnu/chess/gnuchess-${version}.tar.gz"; 9 + sha256 = "sha256-3fzCC911aQCpq2xCx9r5CiiTv38ZzjR0IM42uuvEGJA="; 10 }; 11 + 12 buildInputs = [ 13 flex 14 ]; 15 nativeBuildInputs = [ makeWrapper ]; 16 17 postInstall = '' ··· 19 wrapProgram $out/bin/gnuchessu --set PATH "$out/bin" 20 ''; 21 22 + meta = with lib; { 23 description = "GNU Chess engine"; 24 + maintainers = with maintainers; [ raskin ]; 25 + platforms = platforms.unix; 26 + license = licenses.gpl3Plus; 27 }; 28 }
-1
pkgs/games/gnuchess/default.upstream
··· 1 - url https://ftp.gnu.org/gnu/chess/
···