mya: init at 1.0.0

Co-authored-by: Emily <vcs@emily.moe>

+95
+26
pkgs/applications/misc/mya/argp.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index 273968c..236e5fb 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -3,10 +3,6 @@ project(mya) 6 + set(CMAKE_C_STANDARD 11 ) 7 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall") 8 + 9 + -if(UNIX) 10 + - set(LINUX TRUE) 11 + -endif() 12 + - 13 + set(SRC_DIR src) 14 + set(INC_DIR include) 15 + 16 + @@ -17,7 +13,8 @@ set_target_properties(mya PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DI 17 + target_include_directories(mya PRIVATE ${INC_DIR}) 18 + 19 + set(LIBS curl json-c bsd) 20 + -if(LINUX) 21 + - list(APPEND LIBS) 22 + +find_library(ARGP argp) 23 + +if(ARGP) 24 + + list(APPEND LIBS argp) 25 + endif() 26 + target_link_libraries(mya ${LIBS})
+67
pkgs/applications/misc/mya/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 + , ninja 6 + , curl 7 + , json_c 8 + , libbsd 9 + , argp-standalone 10 + }: 11 + 12 + stdenv.mkDerivation (finalAttrs: { 13 + pname = "mya"; 14 + version = "1.0.0"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "jmakhack"; 18 + repo = "myanimelist-cli"; 19 + rev = "refs/tags/v${finalAttrs.version}"; 20 + hash = "sha256-EmdkPpYEUIk9hr6rbnixjvznKSEnTCSMZz/17BfHGCk="; 21 + }; 22 + 23 + nativeBuildInputs = [ 24 + cmake 25 + ninja 26 + ]; 27 + 28 + buildInputs = [ 29 + curl 30 + json_c 31 + libbsd 32 + ] ++ lib.optionals (!stdenv.hostPlatform.isGnu) [ 33 + argp-standalone 34 + ]; 35 + 36 + patches = [ 37 + ./argp.patch 38 + ]; 39 + 40 + installPhase = '' 41 + runHook preInstall 42 + 43 + # Based on the upstream PKGBUILD 44 + mkdir -p $out/share/doc/${finalAttrs.pname} 45 + cp -a bin $out 46 + cp $cmakeDir/README.md $out/share/doc/${finalAttrs.pname} 47 + 48 + runHook postInstall 49 + ''; 50 + 51 + meta = with lib; { 52 + description = "Minimalistic command line interface for fetching user anime data from MyAnimeList"; 53 + longDescription = '' 54 + Minimalistic command line interface for fetching user anime data from MyAnimeList. 55 + 56 + You have to run this with the MYANIMELIST_CLIENT_ID environ variable set. 57 + Where to get one: <https://myanimelist.net/apiconfig>. 58 + Select the type `other`. 59 + ''; 60 + homepage = "https://github.com/jmakhack/myanimelist-cli"; 61 + changelog = "https://github.com/jmakhack/myanimelist-cli/releases/tag/v${finalAttrs.version}"; 62 + license = licenses.mit; 63 + maintainers = with maintainers; [ pbsds ]; 64 + mainProgram = "mya"; 65 + platforms = platforms.all; 66 + }; 67 + })
+2
pkgs/top-level/all-packages.nix
··· 951 951 952 952 mongosh = callPackage ../development/tools/mongosh { }; 953 953 954 + mya = callPackage ../applications/misc/mya { }; 955 + 954 956 mysql-shell = callPackage ../development/tools/mysql-shell { 955 957 inherit (darwin) cctools developer_cmds DarwinTools; 956 958 inherit (darwin.apple_sdk.frameworks) CoreServices;