Change:
Project description Prowlarr is an indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports management of both Torrent Trackers and Usenet Indexers. Metadata homepage URL: source URL: license: GPL 3 platforms: Unix
I would like to package this software but I am still trying to learn how to properly create derivations as I have never done one. Help / guidance appreciated!
I have a WIP PR for this against my fork The package builds fine, but I am still trying to figure out how to test the NixOS module in my dotfiles repo using flakes and overlays :sweat_smile:
I actually got this working much quicker than expected. Here is my PR to this repo
Thank you very much

Discussion:
githubId = 117874; name = "Jeroen de Haas"; }; <ins> jdreaver = { email = "johndreaver@gmail.com"; github = "jdreaver"; githubId = 1253071; name = "David Reaver"; }; </ins> jduan = { name = "Jingjing Duan"; email = "duanjingjing@gmail.com";

</listitem> <listitem> <para> <ins> <link xlink:href="https://wiki.servarr.com/prowlarr">prowlarr</link>, an indexer manager/proxy built on the popular arr .net/reactjs base stack <link linkend="opt-services.prowlarr.enable">services.prowlarr</link>. </para> </listitem> <listitem> <para> </ins> <link xlink:href="https://sr.ht/~emersion/soju">soju</link>, a user-friendly IRC bouncer. Available as <link xlink:href="options.html#opt-services.soju.enable">services.soju</link>.

- [postfixadmin](https://postfixadmin.sourceforge.io/), a web based virtual user administration interface for Postfix mail servers. Available as [postfixadmin](#opt-services.postfixadmin.enable). <ins> - [prowlarr](https://wiki.servarr.com/prowlarr), an indexer manager/proxy built on the popular arr .net/reactjs base stack [services.prowlarr](#opt-services.prowlarr.enable). </ins> - [soju](https://sr.ht/~emersion/soju), a user-friendly IRC bouncer. Available as [services.soju](options.html#opt-services.soju.enable). - [nats](https://nats.io/), a high performance cloud and edge messaging system. Available as [services.nats](#opt-services.nats.enable).

./services/misc/plex.nix ./services/misc/plikd.nix ./services/misc/podgrab.nix <ins> ./services/misc/prowlarr.nix </ins> ./services/misc/tautulli.nix ./services/misc/pinnwand.nix ./services/misc/pykms.nix

<ins> { config, pkgs, lib, ... }: with lib; let cfg = config.services.prowlarr; in { options = { services.prowlarr = { enable = mkEnableOption "Prowlarr"; openFirewall = mkOption { type = types.bool; default = false; description = "Open ports in the firewall for the Prowlarr web interface."; }; }; }; config = mkIf cfg.enable { systemd.services.prowlarr = { description = "Prowlarr"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { Type = "simple"; DynamicUser = true; StateDirectory = "prowlarr"; ExecStart = "${pkgs.prowlarr}/bin/Prowlarr -nobrowser -data=/var/lib/prowlarr"; Restart = "on-failure"; }; }; networking.firewall = mkIf cfg.openFirewall { allowedTCPPorts = [ 9696 ]; }; }; } </ins>

prosody = handleTest ./xmpp/prosody.nix {}; prosodyMysql = handleTest ./xmpp/prosody-mysql.nix {}; proxy = handleTest ./proxy.nix {}; <ins> prowlarr = handleTest ./prowlarr.nix {}; </ins> pt2-clone = handleTest ./pt2-clone.nix {}; qboot = handleTestOn ["x86_64-linux" "i686-linux"] ./qboot.nix {}; quorum = handleTest ./quorum.nix {};

<ins> import ./make-test-python.nix ({ lib, ... }: with lib; { name = "prowlarr"; meta.maintainers = with maintainers; [ jdreaver ]; nodes.machine = { pkgs, ... }: { services.prowlarr.enable = true; }; testScript = '' machine.wait_for_unit("prowlarr.service") machine.wait_for_open_port("9696") machine.succeed("curl --fail http://localhost:9696/") ''; }) </ins>

<ins> { lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnetCorePackages, openssl, nixosTests }: let os = if stdenv.isDarwin then "osx" else if stdenv.isLinux then "linux" else throw "Not supported on ${stdenv.hostPlatform.system}."; arch = { x86_64-linux = "x64"; aarch64-linux = "arm64"; x86_64-darwin = "x64"; }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); hash = { x64-linux_hash = "sha256-9DoqyotXAUha2TMSgDIot5PD8ABpfZ8gsshS1ypr5SY="; arm64-linux_hash = "sha256-r22c70OuevRsF8gOHZOkkhlRtoD4nsTHnXF82elQIF8="; x64-osx_hash = "sha256-6jVM4iSGT7tpagocI/1nuBPVvAegfFqsCfrz2fPKCI4="; }."${arch}-${os}_hash"; in stdenv.mkDerivation rec { pname = "prowlarr"; version = "0.1.1.978"; src = fetchurl { url = "https://github.com/Prowlarr/Prowlarr/releases/download/v${version}/Prowlarr.develop.${version}.${os}-core-${arch}.tar.gz"; sha256 = hash; }; nativeBuildInputs = [ makeWrapper ]; installPhase = '' runHook preInstall mkdir -p $out/{bin,share/${pname}-${version}} cp -r * $out/share/${pname}-${version}/. makeWrapper "${dotnetCorePackages.netcore_3_1}/bin/dotnet" $out/bin/Prowlarr  --add-flags "$out/share/${pname}-${version}/Prowlarr.dll"  --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ curl sqlite libmediainfo mono openssl icu ]} runHook postInstall ''; passthru = { updateScript = ./update.sh; tests.smoke-test = nixosTests.prowlarr; }; meta = with lib; { description = "An indexer manager/proxy built on the popular arr .net/reactjs base stack"; homepage = "https://wiki.servarr.com/prowlarr"; license = licenses.gpl3Only; maintainers = with maintainers; [ jdreaver ]; platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; }; } </ins>

<ins> #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl gnused nix-prefetch jq set -eou pipefail dirname="$(dirname "$0")" updateHash() { version=$1 arch=$2 os=$3 hashKey="${arch}-${os}_hash" url="https://github.com/Prowlarr/Prowlarr/releases/download/v$version/Prowlarr.develop.$version.$os-core-$arch.tar.gz" hash=$(nix-prefetch-url --type sha256 $url) sriHash="$(nix hash to-sri --type sha256 $hash)" sed -i "s|$hashKey = "[a-zA-Z0-9/+-=]*";|$hashKey = "$sriHash";|g" "$dirname/default.nix" } updateVersion() { sed -i "s/version = "[0-9.]*";/version = "$1";/g" "$dirname/default.nix" } currentVersion=$(cd $dirname && nix eval --raw -f ../../.. prowlarr.version) # N.B. Prowlarr is still in development, so # https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest # returns nothing. Once this endpoint returns something, we should use # it. Until then, we use jq to sort releases (N.B. the "sort_by(. | # split(".") | map(tonumber))" incantation is to sort the version # number properly and not as a string). # latestTag=$(curl https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest | jq -r ".tag_name") # latestVersion="$(expr $latestTag : 'v(.*)')" latestVersion=$(curl https://api.github.com/repos/Prowlarr/Prowlarr/git/refs/tags | jq '. | map(.ref | sub("refs/tags/v";"")) | sort_by(. | split(".") | map(tonumber)) | .[-1]' -r) if [[ "$currentVersion" == "$latestVersion" ]]; then echo "Prowlarr is up-to-date: ${currentVersion}" exit 0 fi updateVersion $latestVersion updateHash $latestVersion x64 linux updateHash $latestVersion arm64 linux updateHash $latestVersion x64 osx </ins>

openmodelica = recurseIntoAttrs (callPackage ../applications/science/misc/openmodelica {}); <ins> prowlarr = callPackage ../servers/prowlarr { }; </ins> qarte = libsForQt5.callPackage ../applications/video/qarte { }; qlcplus = libsForQt5.callPackage ../applications/misc/qlcplus { };