Compare commits
2 Commits
master
...
dc171890f1
Author | SHA1 | Date | |
---|---|---|---|
dc171890f1
|
|||
b1d9cd902a
|
72
flake.lock
generated
72
flake.lock
generated
@@ -107,11 +107,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732109232,
|
"lastModified": 1732742778,
|
||||||
"narHash": "sha256-iYh6h8yueU8IyOfNclbiBG2+fBFcjjUfXm90ZBzk0c0=",
|
"narHash": "sha256-i+Uw8VOHzQe9YdNwKRbzvaPWLE07tYVqUDzSFTXhRgk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "a0c384e0a3b8bcaed30a6bcf3783f8a7c8b35be4",
|
"rev": "341482e2f4d888e3f60cae1c12c3df896e7230d8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -123,11 +123,11 @@
|
|||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730674701,
|
"lastModified": 1732798888,
|
||||||
"narHash": "sha256-lf9MQs8+NUvQd8b5t+7c4kLqUQixGO9WwWcLa1XYuiQ=",
|
"narHash": "sha256-k7v5PE6OcqMkC/u7aokwcxKDmTKM+ejiZGCsH9MK0s0=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "firefox-gnome-theme",
|
"repo": "firefox-gnome-theme",
|
||||||
"rev": "823756d8ddd21cfd3a24a87dad402e490e0eb5ee",
|
"rev": "ef6ac4285eaac6053338a6240bc615902a839493",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -318,11 +318,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731880681,
|
"lastModified": 1732466619,
|
||||||
"narHash": "sha256-FmYTkIyPBUxSWgA7DPIVTsCCMvSSbs56yOtHpLNSnKg=",
|
"narHash": "sha256-T1e5oceypZu3Q8vzICjv1X/sGs9XfJRMW5OuXHgpB3c=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "aecd341dfead1c3ef7a3c15468ecd71e8343b7c6",
|
"rev": "f3111f62a23451114433888902a55cf0692b408d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -340,11 +340,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732025103,
|
"lastModified": 1732482255,
|
||||||
"narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
|
"narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a46e702093a5c46e192243edbd977d5749e7f294",
|
"rev": "a9953635d7f34e7358d5189751110f87e3ac17da",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -405,11 +405,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732016537,
|
"lastModified": 1732603785,
|
||||||
"narHash": "sha256-XwXUK+meYnlhdQz2TVE4Wv+tsx1CkdGbDPt1tRzCNH4=",
|
"narHash": "sha256-AEjWTJwOmSnVYsSJCojKgoguGfFfwel6z/6ud6UFMU8=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "61cee20168a3ebb71a9efd70a55adebaadfbe4d4",
|
"rev": "6ab87b7c84d4ee873e937108c4ff80c015a40c7a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -420,11 +420,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731797098,
|
"lastModified": 1732483221,
|
||||||
"narHash": "sha256-UhWmEZhwJZmVZ1jfHZFzCg+ZLO9Tb/v3Y6LC0UNyeTo=",
|
"narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "672ac2ac86f7dff2f6f3406405bddecf960e0db6",
|
"rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -489,11 +489,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732014248,
|
"lastModified": 1732521221,
|
||||||
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -520,11 +520,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731755305,
|
"lastModified": 1732350895,
|
||||||
"narHash": "sha256-v5P3dk5JdiT+4x69ZaB18B8+Rcu3TIOrcdG4uEX7WZ8=",
|
"narHash": "sha256-GcOQbOgmwlsRhpLGSwZJwLbo3pu9ochMETuRSS1xpz4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "057f63b6dc1a2c67301286152eb5af20747a9cb4",
|
"rev": "0c582677378f2d9ffcb01490af2f2c678dcb29d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -548,11 +548,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732143099,
|
"lastModified": 1732726573,
|
||||||
"narHash": "sha256-lh2Qi8gd1SwJVGo7gJjoFvS/djS5Nimaw25j792PJjM=",
|
"narHash": "sha256-gvCPgtcXGf/GZaJBHYrXuM5r2pFRG3VDr7uOb7B1748=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "2f71c4250bef7a52fe21bd00d1e58c119f62008c",
|
"rev": "fc9178d124eba824f1862513314d351784e1a84c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -594,11 +594,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731193165,
|
"lastModified": 1732639391,
|
||||||
"narHash": "sha256-pGF8L5g9QpkQtJP9JmNIRNZfcyhJHf7uT+d8tqI1h6Y=",
|
"narHash": "sha256-kFtXjoCIqx9xe0ZryPXpqS6l/HVg71aNcuL8Y5e8+pI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "plasma-manager",
|
"repo": "plasma-manager",
|
||||||
"rev": "f33173b9d22e554a6f869626bc01808d35995257",
|
"rev": "06e3209d11797d9c741e25df06ab61048746bf93",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -690,11 +690,11 @@
|
|||||||
"thunderbird-gnome-theme": {
|
"thunderbird-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1721874544,
|
"lastModified": 1732643121,
|
||||||
"narHash": "sha256-BHW9jlx92CsHY84FT0ce5Vxl0KFheLhNn2vndcIf7no=",
|
"narHash": "sha256-i0Uo5EN45rlGuR85hvPet43zW/thOQTwHypVg9shTHU=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "thunderbird-gnome-theme",
|
"repo": "thunderbird-gnome-theme",
|
||||||
"rev": "628fcccb7788e3e0ad34f67114f563c87ac8c1dc",
|
"rev": "1994e7ec0649053e2a0811973245758d41e33f5f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -711,11 +711,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732111664,
|
"lastModified": 1732643199,
|
||||||
"narHash": "sha256-XWHuPWcP59QnHEewdZJXBX1TA2lAP78Vz4daG6tfIr4=",
|
"narHash": "sha256-uI7TXEb231o8dkwB5AUCecx3AQtosRmL6hKgnckvjps=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "62003fdad7a5ab7b6af3ea9bd7290e4c220277d0",
|
"rev": "84637a7ab04179bdc42aa8fd0af1909fba76ad0c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let streamrip = pkgs.callPackage ../../pkgs/streamrip/package.nix { };
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@@ -49,6 +51,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
streamrip
|
||||||
|
];
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
apps.qbittorrent.enable = true;
|
apps.qbittorrent.enable = true;
|
||||||
|
@@ -0,0 +1,26 @@
|
|||||||
|
From 18efb9b5c8e562b169425f6ba79977e52e8b91b9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Sobolev <paveloomm@gmail.com>
|
||||||
|
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
|
||||||
|
|
78
pkgs/streamrip/package.nix
Normal file
78
pkgs/streamrip/package.nix
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
{ lib
|
||||||
|
, python3Packages
|
||||||
|
, fetchFromGitHub
|
||||||
|
|
||||||
|
, ffmpeg
|
||||||
|
}:
|
||||||
|
|
||||||
|
python3Packages.buildPythonApplication {
|
||||||
|
pname = "streamrip";
|
||||||
|
version = "2.0.7";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "nathom";
|
||||||
|
repo = "streamrip";
|
||||||
|
rev = "46b570dbb6f81d604cbaa3bfa379463e0a20a841";
|
||||||
|
hash = "sha256-LD99OjguaBnrQxCwmCeHvmBMq5aOfobwnMd5/aCRZW8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
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 = "Scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer";
|
||||||
|
homepage = "https://github.com/nathom/streamrip";
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
maintainers = with maintainers; [ paveloom ];
|
||||||
|
mainProgram = "rip";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user