From 4bdb997e48ae014b1c078d9ccfd2229714dd05f3 Mon Sep 17 00:00:00 2001 From: Pavel Sobolev Date: Sat, 13 Jan 2024 13:06:22 +0000 Subject: [PATCH 001/189] streamrip: init at 2.0.5 --- pkgs/by-name/st/streamrip/package.nix | 77 +++++++++++++++++++ ...-the-default-config-file-is-writable.patch | 26 +++++++ 2 files changed, 103 insertions(+) create mode 100644 pkgs/by-name/st/streamrip/package.nix create mode 100644 pkgs/by-name/st/streamrip/patches/ensure-the-default-config-file-is-writable.patch diff --git a/pkgs/by-name/st/streamrip/package.nix b/pkgs/by-name/st/streamrip/package.nix new file mode 100644 index 000000000000..68f1a7e85121 --- /dev/null +++ b/pkgs/by-name/st/streamrip/package.nix @@ -0,0 +1,77 @@ +{ lib +, python3Packages +, fetchFromGitHub + +, ffmpeg +}: + +python3Packages.buildPythonApplication rec { + pname = "streamrip"; + version = "2.0.5"; + pyproject = true; + + src = fetchFromGitHub { + owner = "nathom"; + repo = "streamrip"; + rev = "v${version}"; + hash = "sha256-KwMt89lOPGt6nX7ywliG/iAJ1WnG0CRPwhAVlPR85q0="; + }; + + patches = [ + ./patches/ensure-the-default-config-file-is-writable.patch + ]; + + nativeBuildInputs = with python3Packages; [ + poetry-core + ]; + + propagatedBuildInputs = with python3Packages; [ + aiodns + aiofiles + aiohttp + aiolimiter + appdirs + cleo + click-help-colors + deezer-py + m3u8 + mutagen + pathvalidate + pillow + pycryptodomex + pytest-asyncio + pytest-mock + rich + simple-term-menu + tomlkit + tqdm + ]; + + nativeCheckInputs = with python3Packages; [ + pytestCheckHook + ]; + + prePatch = '' + sed -i 's#aiofiles = ".*"#aiofiles = "*"#' pyproject.toml + sed -i 's#deezer-py = ".*"#deezer-py = "*"#' pyproject.toml + sed -i 's#m3u8 = ".*"#m3u8 = "*"#' pyproject.toml + sed -i 's#pathvalidate = ".*"#pathvalidate = "*"#' pyproject.toml + sed -i 's#Pillow = ".*"#Pillow = "*"#' pyproject.toml + sed -i 's#pytest-asyncio = ".*"#pytest-asyncio = "*"#' pyproject.toml + sed -i 's#tomlkit = ".*"#tomlkit = "*"#' pyproject.toml + + sed -i 's#"ffmpeg"#"${lib.getBin ffmpeg}/bin/ffmpeg"#g' streamrip/client/downloadable.py + ''; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + meta = with lib; { + description = "A scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer"; + homepage = "https://github.com/nathom/streamrip"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ paveloom ]; + mainProgram = "rip"; + }; +} diff --git a/pkgs/by-name/st/streamrip/patches/ensure-the-default-config-file-is-writable.patch b/pkgs/by-name/st/streamrip/patches/ensure-the-default-config-file-is-writable.patch new file mode 100644 index 000000000000..5bd47195dcbf --- /dev/null +++ b/pkgs/by-name/st/streamrip/patches/ensure-the-default-config-file-is-writable.patch @@ -0,0 +1,26 @@ +From 18efb9b5c8e562b169425f6ba79977e52e8b91b9 Mon Sep 17 00:00:00 2001 +From: Pavel Sobolev +Date: Sat, 13 Jan 2024 12:49:45 +0000 +Subject: [PATCH] Ensure the default config file is writable. + +--- + streamrip/config.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/streamrip/config.py b/streamrip/config.py +index 7ee2f57..88a5fef 100644 +--- a/streamrip/config.py ++++ b/streamrip/config.py +@@ -378,6 +378,9 @@ def set_user_defaults(path: str, /): + """Update the TOML file at the path with user-specific default values.""" + shutil.copy(BLANK_CONFIG_PATH, path) + ++ # Ensure the default config file is writable ++ os.chmod(path, 0o644) ++ + with open(path) as f: + toml = parse(f.read()) + toml["downloads"]["folder"] = DEFAULT_DOWNLOADS_FOLDER # type: ignore +-- +2.42.0 + From be0cfacc2ed3db4ed50b43e9bd7f00e4c03c6e52 Mon Sep 17 00:00:00 2001 From: DataHearth Date: Sun, 28 Apr 2024 01:01:37 +0200 Subject: [PATCH 002/189] maintainers: update datahearth fingerprints --- maintainers/maintainer-list.nix | 11 +- pkgs/development/web/insomnia/default.nix | 155 +++++++++------------- 2 files changed, 74 insertions(+), 92 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ff48ec64b1ed..9a27f15139dc 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4505,9 +4505,14 @@ github = "DataHearth"; githubId = 28595242; name = "DataHearth"; - keys = [{ - fingerprint = "A129 2547 0298 BFEE 7EE0 92B3 946E 2D0C 410C 7B3D"; - }]; + keys = [ + { + fingerprint = "A129 2547 0298 BFEE 7EE0 92B3 946E 2D0C 410C 7B3D"; + } + { + fingerprint = "FFC4 92C1 5320 B05D 0F8D 7D58 ABF6 737C 6339 6D35"; + } + ]; }; davegallant = { name = "Dave Gallant"; diff --git a/pkgs/development/web/insomnia/default.nix b/pkgs/development/web/insomnia/default.nix index 0d9b0e422b50..29c5e7ffd65d 100644 --- a/pkgs/development/web/insomnia/default.nix +++ b/pkgs/development/web/insomnia/default.nix @@ -1,100 +1,77 @@ -{ lib, stdenv, makeWrapper, fetchurl, dpkg, alsa-lib, atk, cairo, cups, dbus, expat -, fontconfig, freetype, gdk-pixbuf, glib, pango, mesa, nspr, nss, gtk3 -, at-spi2-atk, gsettings-desktop-schemas, gobject-introspection, wrapGAppsHook3 -, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext -, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence, nghttp2 -, libudev0-shim, glibc, curl, openssl, autoPatchelfHook }: - +{ + lib, + stdenv, + fetchurl, + appimageTools +}: let - runtimeLibs = lib.makeLibraryPath [ - curl - glibc - libudev0-shim - nghttp2 - openssl - stdenv.cc.cc.lib - ]; -in stdenv.mkDerivation rec { pname = "insomnia"; version = "8.6.1"; src = fetchurl { - url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.deb"; - hash = "sha256-qy2j6kdmtDgfTab8gTz7eb/uNKwtzbxcoJHNibVa35c="; - }; - - nativeBuildInputs = [ - autoPatchelfHook - dpkg - makeWrapper - gobject-introspection - wrapGAppsHook3 - ]; - - buildInputs = [ - alsa-lib - at-spi2-atk - atk - cairo - cups - dbus - expat - fontconfig - freetype - gdk-pixbuf - glib - pango - gtk3 - gsettings-desktop-schemas - libX11 - libXScrnSaver - libXcomposite - libXcursor - libXdamage - libXext - libXfixes - libXi - libXrandr - libXrender - libXtst - libxcb - libxshmfence - mesa # for libgbm - nspr - nss - ]; - - dontBuild = true; - dontConfigure = true; - dontWrapGApps = true; - - unpackPhase = "dpkg-deb -x $src ."; - - installPhase = '' - mkdir -p $out/share/insomnia $out/lib $out/bin - - mv usr/share/* $out/share/ - mv opt/Insomnia/* $out/share/insomnia - - ln -s $out/share/insomnia/insomnia $out/bin/insomnia - sed -i 's|\/opt\/Insomnia|'$out'/bin|g' $out/share/applications/insomnia.desktop - ''; - - preFixup = '' - wrapProgramShell "$out/bin/insomnia" \ - "''${gappsWrapperArgs[@]}" \ - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \ - --prefix LD_LIBRARY_PATH : ${runtimeLibs} - ''; + x86_64-darwin = { + url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.dmg"; + hash = "sha256-4Y6e5cQ9J0enp2teXVNCvrjbhH130op45BVxZxA74JE"; + }; + x86_64-linux = { + url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.AppImage"; + hash = lib.fakeHash; + }; + }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); meta = with lib; { - homepage = "https://insomnia.rest/"; - description = "The most intuitive cross-platform REST API Client"; + homepage = "https://insomnia.rest"; + description = " The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage. "; mainProgram = "insomnia"; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - license = licenses.mit; - platforms = [ "x86_64-linux" ]; - maintainers = with maintainers; [ markus1189 babariviere kashw2 ]; + changelog = "https://github.com/Kong/insomnia/releases/tag/core@${version}"; + license = licenses.asl20; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; + maintainers = with maintainers; [ markus1189 babariviere kashw2 DataHearth ]; }; +in +if stdenv.isDarwin then stdenv.mkDerivation { + inherit pname version src meta; + sourceRoot = "."; + unpackCmd = '' + echo "Creating temp directory" + mnt=$(TMPDIR=/tmp mktemp -d -t nix-XXXXXXXXXX) + function finish { + echo "Ejecting temp directory" + /usr/bin/hdiutil detach $mnt -force + rm -rf $mnt + } + # Detach volume when receiving SIG "0" + trap finish EXIT + # Mount DMG file + echo "Mounting DMG file into \"$mnt\"" + /usr/bin/hdiutil attach -nobrowse -mountpoint $mnt $curSrc + # Copy content to local dir for later use + echo 'Copying extracted content into "sourceRoot"' + cp -a $mnt/Insomnia.app $PWD/ + ''; + + installPhase = '' + runHook preInstall + mkdir -p "$out/Applications" + mv Insomnia.app $out/Applications/ + runHook postInstall + ''; +} else { + inherit pname version src meta; + + extraInstallCommands = let + appimageContents = appimageTools.extract { + inherit pname version src; + }; + in '' + # Replace version from binary name + mv $out/bin/${pname}-${version} $out/bin/${pname} + # Install XDG Desktop file and its icon + install -Dm444 ${appimageContents}/insomnia.desktop -t $out/share/applications + install -Dm444 ${appimageContents}/insomnia.png -t $out/share/pixmaps + # Replace wrong exec statement in XDG Desktop file + substituteInPlace $out/share/applications/insomnia.desktop \ + --replace 'Exec=AppRun --no-sandbox %U' 'Exec=insomnia' + ''; } From aac727eef0ffb6c5db016a1c00a4dbbf937bf0ca Mon Sep 17 00:00:00 2001 From: DataHearth Date: Mon, 29 Apr 2024 00:11:44 +0200 Subject: [PATCH 003/189] insomnia: 8.6.1 -> 9.0.0 --- pkgs/development/web/insomnia/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/development/web/insomnia/default.nix b/pkgs/development/web/insomnia/default.nix index 29c5e7ffd65d..d46a098e89f9 100644 --- a/pkgs/development/web/insomnia/default.nix +++ b/pkgs/development/web/insomnia/default.nix @@ -6,16 +6,16 @@ }: let pname = "insomnia"; - version = "8.6.1"; + version = "9.0.0"; src = fetchurl { x86_64-darwin = { url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.dmg"; - hash = "sha256-4Y6e5cQ9J0enp2teXVNCvrjbhH130op45BVxZxA74JE"; + hash = "sha256-QIArPdThQcNTUgrXpWP8JHaZfrZ/6ztekIvzFdoWjsY="; }; x86_64-linux = { url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.AppImage"; - hash = lib.fakeHash; + hash = "sha256-2UiqopYmNxnDcIqQMn/H89ugvOtTWkHH4LrmKkQErSs="; }; }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); @@ -57,7 +57,7 @@ if stdenv.isDarwin then stdenv.mkDerivation { mv Insomnia.app $out/Applications/ runHook postInstall ''; -} else { +} else appimageTools.wrapType2 { inherit pname version src meta; extraInstallCommands = let @@ -65,13 +65,11 @@ if stdenv.isDarwin then stdenv.mkDerivation { inherit pname version src; }; in '' - # Replace version from binary name - mv $out/bin/${pname}-${version} $out/bin/${pname} # Install XDG Desktop file and its icon install -Dm444 ${appimageContents}/insomnia.desktop -t $out/share/applications install -Dm444 ${appimageContents}/insomnia.png -t $out/share/pixmaps # Replace wrong exec statement in XDG Desktop file substituteInPlace $out/share/applications/insomnia.desktop \ - --replace 'Exec=AppRun --no-sandbox %U' 'Exec=insomnia' + --replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=insomnia' ''; } From 35d05033a839943cf22de44b341278bbde4de2e7 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Sun, 12 May 2024 13:04:04 -0400 Subject: [PATCH 004/189] spicetify-cli: rename bin --- pkgs/by-name/sp/spicetify-cli/package.nix | 24 +++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/sp/spicetify-cli/package.nix b/pkgs/by-name/sp/spicetify-cli/package.nix index 13d1b8aceedb..cd53385ca60a 100644 --- a/pkgs/by-name/sp/spicetify-cli/package.nix +++ b/pkgs/by-name/sp/spicetify-cli/package.nix @@ -1,4 +1,10 @@ -{ lib, buildGoModule, fetchFromGitHub, testers, spicetify-cli }: +{ + lib, + buildGoModule, + fetchFromGitHub, + testers, + spicetify-cli, +}: buildGoModule rec { pname = "spicetify-cli"; @@ -20,6 +26,8 @@ buildGoModule rec { # used at runtime, but not installed by default postInstall = '' + mv $out/bin/spicetify-cli $out/bin/spicetify + ln -s $out/bin/spicetify $out/bin/spicetify-cli cp -r ${src}/jsHelper $out/bin/jsHelper cp -r ${src}/CustomApps $out/bin/CustomApps cp -r ${src}/Extensions $out/bin/Extensions @@ -28,19 +36,19 @@ buildGoModule rec { doInstallCheck = true; installCheckPhase = '' - $out/bin/spicetify-cli --help > /dev/null + $out/bin/spicetify --help > /dev/null ''; - passthru.tests.version = testers.testVersion { - package = spicetify-cli; - command = "spicetify-cli -v"; - }; + passthru.tests.version = testers.testVersion { package = spicetify-cli; }; meta = with lib; { description = "Command-line tool to customize Spotify client"; homepage = "https://github.com/spicetify/spicetify-cli/"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ jonringer mdarocha ]; - mainProgram = "spicetify-cli"; + maintainers = with maintainers; [ + jonringer + mdarocha + ]; + mainProgram = "spicetify"; }; } From 7d516d945d723314dd58aa86df72523718bd4848 Mon Sep 17 00:00:00 2001 From: Savyasachee Jha Date: Mon, 20 May 2024 17:02:46 +0530 Subject: [PATCH 005/189] firefly-iii: 6.1.15 -> 6.1.16 --- pkgs/by-name/fi/firefly-iii/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/fi/firefly-iii/package.nix b/pkgs/by-name/fi/firefly-iii/package.nix index ad1782de129b..f1c88db5c3bb 100644 --- a/pkgs/by-name/fi/firefly-iii/package.nix +++ b/pkgs/by-name/fi/firefly-iii/package.nix @@ -8,20 +8,20 @@ let pname = "firefly-iii"; - version = "6.1.15"; + version = "6.1.16"; phpPackage = php83; src = fetchFromGitHub { owner = "firefly-iii"; repo = "firefly-iii"; rev = "v${version}"; - hash = "sha256-9Od8tR8X2OZ2hu81tHWDpBX8snWCRvTnlY1AwjIcMug="; + hash = "sha256-1I4Wm10mmloqeWcpc4XloNATpvroiw6m8MiSVsoB6xo="; }; assets = buildNpmPackage { pname = "${pname}-assets"; inherit version src; - npmDepsHash = "sha256-UVySgcj1tQLQIxlsZuig4ixkfxfsYWYPKWLz5zHA+Dg="; + npmDepsHash = "sha256-Ff7pDKoXvyj/gR+ljQsCjtyzxzJ7/zN6hRMEAderqOg="; dontNpmBuild = true; installPhase = '' runHook preInstall @@ -36,7 +36,7 @@ in phpPackage.buildComposerProject (finalAttrs: { inherit pname src version; - vendorHash = "sha256-RDkAbTKj7M7lE8bVRxb+RR5CA6hJIMp61U0+aRtFE50="; + vendorHash = "sha256-BanSEqE3KN46VtEZH0TVWUBrgPCwmd2TjheYq+e+lzo="; passthru = { inherit phpPackage; From eee8b0bff3a0d6380b1b745dd04ba545e40ba3fd Mon Sep 17 00:00:00 2001 From: Savyasachee Jha Date: Mon, 20 May 2024 17:03:51 +0530 Subject: [PATCH 006/189] nixos/firefly-iii: Changes to module and tests Module has been fixed and now uses the maintenance service to cache settings so as to not require environment files wherever possible. The tests now test using mariadb and postgresql as well as sqlite to be more complete. A test has been added for testing whether app.js has been compiled successfully, as well as to check whether the cronjob fires successfully. --- .../modules/services/web-apps/firefly-iii.nix | 91 +++++++++-------- nixos/tests/firefly-iii.nix | 97 +++++++++++++++++-- 2 files changed, 142 insertions(+), 46 deletions(-) diff --git a/nixos/modules/services/web-apps/firefly-iii.nix b/nixos/modules/services/web-apps/firefly-iii.nix index b0024ce09c38..6b383139c891 100644 --- a/nixos/modules/services/web-apps/firefly-iii.nix +++ b/nixos/modules/services/web-apps/firefly-iii.nix @@ -3,8 +3,8 @@ let inherit (lib) optionalString mkDefault mkIf mkOption mkEnableOption literalExpression; inherit (lib.types) nullOr attrsOf oneOf str int bool path package enum submodule; - inherit (lib.strings) concatMapStringsSep removePrefix toShellVars removeSuffix hasSuffix; - inherit (lib.attrsets) attrValues genAttrs filterAttrs mapAttrs' nameValuePair; + inherit (lib.strings) concatLines removePrefix toShellVars removeSuffix hasSuffix; + inherit (lib.attrsets) mapAttrsToList attrValues genAttrs filterAttrs mapAttrs' nameValuePair; inherit (builtins) isInt isString toString typeOf; cfg = config.services.firefly-iii; @@ -21,18 +21,10 @@ let (filterAttrs (n: v: hasSuffix "_FILE" n) cfg.settings); env-nonfile-values = filterAttrs (n: v: ! hasSuffix "_FILE" n) cfg.settings; - envfile = pkgs.writeText "firefly-iii-env" '' - ${toShellVars env-file-values} - ${toShellVars env-nonfile-values} - ''; - fileenv-func = '' - cp --no-preserve=mode ${envfile} /tmp/firefly-iii-env - ${concatMapStringsSep "\n" - (n: "${pkgs.replace-secret}/bin/replace-secret ${n} ${n} /tmp/firefly-iii-env") - (attrValues env-file-values)} set -a - . /tmp/firefly-iii-env + ${toShellVars env-nonfile-values} + ${concatLines (mapAttrsToList (n: v: "${n}=\"$(< ${v})\"") env-file-values)} set +a ''; @@ -41,15 +33,13 @@ let ${optionalString (cfg.settings.DB_CONNECTION == "sqlite") "touch ${cfg.dataDir}/storage/database/database.sqlite"} - ${artisan} migrate --seed --no-interaction --force - ${artisan} firefly-iii:decrypt-all + ${artisan} package:discover ${artisan} firefly-iii:upgrade-database - ${artisan} firefly-iii:correct-database - ${artisan} firefly-iii:report-integrity ${artisan} firefly-iii:laravel-passport-keys ${artisan} cache:clear - - mv /tmp/firefly-iii-env /run/phpfpm/firefly-iii-env + ${artisan} view:cache + ${artisan} route:cache + ${artisan} config:cache ''; commonServiceConfig = { @@ -146,6 +136,7 @@ in { virtualHost = mkOption { type = str; + default = "localhost"; description = '' The hostname at which you wish firefly-iii to be served. If you have enabled nginx using `services.firefly-iii.enableNginx` then this will @@ -170,14 +161,15 @@ in { }; settings = mkOption { + default = {}; description = '' Options for firefly-iii configuration. Refer to for details on supported values. All