Merge pull request #111366 from tu-maurice/unstable/fishnet-2.2.3

fishnet: init at 2.2.3

authored by Sandro and committed by GitHub ad29e422 f7537c59

+96
+57
pkgs/servers/fishnet/assets.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , xz 5 + , autoPatchelfHook }: 6 + 7 + # Assets for fishnet: A collection of pre-built compressed stockfish binaries. 8 + # We have to decompress them, patch them using auto-patchelf and compress them 9 + # again so that a selection of them can be embedded into the fishnet binary. 10 + stdenv.mkDerivation rec { 11 + pname = "fishnet-assets"; 12 + version = "unstable-2020-01-30"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "niklasf"; 16 + repo = pname; 17 + rev = "b4fa30e57ec8976fb1c10bd36737bc784351b93e"; 18 + sha256 = "0gfs9lm4ih3h3fmgqylw05ii1h0d6mpjfxadnw3wymnjsspfb0m4"; 19 + }; 20 + 21 + relAssetsPath = "share/${pname}"; 22 + 23 + nativeBuildInputs = [ xz autoPatchelfHook ]; 24 + 25 + postPatch = '' 26 + # Delete packed .exe files and all non .xz files (documentation and readme) 27 + rm *.exe.xz 28 + find \! -name "*.xz" -delete 29 + # Extract .xz files, except *.nnue.xz 30 + # We don't have to unpack the latter and it takes ages to repack 31 + find -name "*.xz" \! -name "*.nnue.xz" | xargs unxz -v 32 + ''; 33 + 34 + dontBuild = true; 35 + 36 + installPhase = '' 37 + mkdir -p $out/${relAssetsPath} 38 + cp ./* $out/${relAssetsPath} 39 + ''; 40 + 41 + preFixup = '' 42 + gatherLibraries '${stdenv.cc.cc.lib}' 43 + ''; 44 + 45 + doDist = true; 46 + distPhase = '' 47 + # repack assets 48 + find $out/${relAssetsPath} -type f \! -name "*.xz" | xargs xz -v 49 + ''; 50 + 51 + meta = with lib; { 52 + description = "Assets for fishnet, only required during build"; 53 + homepage = "https://github.com/niklasf/fishnet-assets"; 54 + license = licenses.gpl3Only; 55 + maintainers = with maintainers; [ tu-maurice ]; 56 + }; 57 + }
+37
pkgs/servers/fishnet/default.nix
··· 1 + { lib 2 + , stdenv 3 + , rustPlatform 4 + , fetchFromGitHub 5 + , xz 6 + , autoPatchelfHook }: 7 + 8 + let 9 + assets = import ./assets.nix { 10 + inherit lib stdenv fetchFromGitHub xz autoPatchelfHook; 11 + }; 12 + in 13 + rustPlatform.buildRustPackage rec { 14 + pname = "fishnet"; 15 + version = "2.2.3"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "niklasf"; 19 + repo = pname; 20 + rev = "v${version}"; 21 + sha256 = "159fwjy70n6lvnhdwv65azgi03r5qcc2m2zpzgz0k3r6cy06faxj"; 22 + }; 23 + 24 + cargoSha256 = "1bfs8dy08799r6d63sb33zwcxas3gzp7jvcxv3w8n64gffan8f2n"; 25 + 26 + preBuild = '' 27 + rmdir ./assets 28 + ln -snf ${assets}/${assets.relAssetsPath} ./assets 29 + ''; 30 + 31 + meta = with lib; { 32 + description = "Distributed Stockfish analysis for lichess.org"; 33 + homepage = "https://github.com/niklasf/fishnet"; 34 + license = licenses.gpl3Plus; 35 + maintainers = with maintainers; [ tu-maurice ]; 36 + }; 37 + }
+2
pkgs/top-level/all-packages.nix
··· 156 156 157 157 fiche = callPackage ../servers/fiche { }; 158 158 159 + fishnet = callPackage ../servers/fishnet { }; 160 + 159 161 avro-tools = callPackage ../development/tools/avro-tools { }; 160 162 161 163 bacnet-stack = callPackage ../tools/networking/bacnet-stack {};