Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 73 lines 1.6 kB view raw
1{ 2 stdenv, 3 lib, 4 pkg-config, 5 zlib, 6 fetchpatch, 7 fetchurl, 8 libsForQt5, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "chessx"; 13 version = "1.6.0"; 14 15 src = fetchurl { 16 url = "mirror://sourceforge/chessx/chessx-${finalAttrs.version}.tgz"; 17 hash = "sha256-76YOe1WpB+vdEoEKGTHeaWJLpCVE4RoyYu1WLy3Dxhg="; 18 }; 19 20 nativeBuildInputs = [ 21 pkg-config 22 ] 23 ++ (with libsForQt5; [ 24 qmake 25 wrapQtAppsHook 26 ]); 27 28 buildInputs = [ 29 zlib 30 ] 31 ++ (with libsForQt5; [ 32 qtbase 33 qtmultimedia 34 qtsvg 35 qttools 36 ]); 37 38 patches = 39 # needed to backport patches to successfully build, due to broken release 40 let 41 repo = "https://github.com/Isarhamster/chessx/"; 42 in 43 [ 44 (fetchpatch { 45 url = "${repo}/commit/9797d46aa28804282bd58ce139b22492ab6881e6.diff"; 46 hash = "sha256-RnIf6bixvAvyp1CKuri5LhgYFqhDNiAVYWUmSUDMgVw="; 47 }) 48 (fetchpatch { 49 url = "${repo}/commit/4fab4d2f649d1cae2b54464c4e28337d1f20c214.diff"; 50 hash = "sha256-EJVHricN+6uabKLfn77t8c7JjO7tMmZGsj7ZyQUGcXA="; 51 }) 52 ]; 53 54 enableParallelBuilding = true; 55 56 installPhase = '' 57 runHook preInstall 58 59 install -Dm555 release/chessx -t "$out/bin" 60 install -Dm444 unix/chessx.desktop -t "$out/share/applications" 61 62 runHook postInstall 63 ''; 64 65 meta = { 66 homepage = "https://chessx.sourceforge.io/"; 67 description = "Browse and analyse chess games"; 68 license = lib.licenses.gpl2Plus; 69 maintainers = with lib.maintainers; [ luispedro ]; 70 platforms = lib.platforms.linux; 71 mainProgram = "chessx"; 72 }; 73})