Flake: update lock file and change nixpkgs patches

This commit is contained in:
Toast 2024-11-24 22:26:22 +01:00
parent e4f9e94269
commit dd07992751
5 changed files with 197 additions and 403 deletions

102
flake.lock generated
View file

@ -75,11 +75,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -93,11 +93,11 @@
"systems": "systems_3"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -182,11 +182,11 @@
]
},
"locked": {
"lastModified": 1732303962,
"narHash": "sha256-5Umjb5AdtxV5jSJd5jxoCckh5mlg+FBQDsyAilu637g=",
"lastModified": 1732453510,
"narHash": "sha256-mAOaLu++YRwOxCJ135Bhgf78WYhIKWHL2aGWCAoXoBg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8cf9cb2ee78aa129e5b8220135a511a2be254c0c",
"rev": "bd58a1132e9b7f121f65313bc662ad6c8a05f878",
"type": "github"
},
"original": {
@ -224,11 +224,11 @@
]
},
"locked": {
"lastModified": 1731227601,
"narHash": "sha256-aGUQ6W/Oxd9xjH9RQbnUtC61sTK2fWlKr+J7kavT/RQ=",
"lastModified": 1732432618,
"narHash": "sha256-7MzATSBJcR9JUkaDgIJ3jEkQLXIbOjt0lqbmlGkcLDg=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "7691d0ac1deb6ac7482c5a22fe1a14a34ca608b0",
"rev": "98a61cf0708885abddebc6938ca7282928981d5e",
"type": "github"
},
"original": {
@ -240,11 +240,11 @@
"lix": {
"flake": false,
"locked": {
"lastModified": 1731334117,
"narHash": "sha256-GoddkPg0/UDv06KcQJiOYP/2IzruYorbI03QRCjN3K8=",
"rev": "8a9094303bc7873c979e54ea20b9f50464ee3965",
"lastModified": 1732112222,
"narHash": "sha256-H7GN4++a4vE49SUNojZx+FSk4mmpb2ifJUtJMJHProI=",
"rev": "66f6dbda32959dd5cf3a9aaba15af72d037ab7ff",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/8a9094303bc7873c979e54ea20b9f50464ee3965.tar.gz?rev=8a9094303bc7873c979e54ea20b9f50464ee3965"
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/66f6dbda32959dd5cf3a9aaba15af72d037ab7ff.tar.gz?rev=66f6dbda32959dd5cf3a9aaba15af72d037ab7ff"
},
"original": {
"type": "tarball",
@ -263,11 +263,11 @@
]
},
"locked": {
"lastModified": 1731185731,
"narHash": "sha256-RNaIu43b9PoXEhW4OqXUNZKY/jezQyCYWwdv1M0VjsA=",
"rev": "691193879d96bdfd1e6ab5ebcca2fadc7604cf34",
"lastModified": 1731967274,
"narHash": "sha256-n6dPGRlMGdL8X5gviA6ZuRfUdbdD5KiNN/BpABA5YT0=",
"rev": "aa2846680fa9a2032939d720487942567fd9eb63",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/691193879d96bdfd1e6ab5ebcca2fadc7604cf34.tar.gz?rev=691193879d96bdfd1e6ab5ebcca2fadc7604cf34"
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/aa2846680fa9a2032939d720487942567fd9eb63.tar.gz?rev=aa2846680fa9a2032939d720487942567fd9eb63"
},
"original": {
"type": "tarball",
@ -286,11 +286,11 @@
]
},
"locked": {
"lastModified": 1731185731,
"narHash": "sha256-RNaIu43b9PoXEhW4OqXUNZKY/jezQyCYWwdv1M0VjsA=",
"rev": "691193879d96bdfd1e6ab5ebcca2fadc7604cf34",
"lastModified": 1731967274,
"narHash": "sha256-n6dPGRlMGdL8X5gviA6ZuRfUdbdD5KiNN/BpABA5YT0=",
"rev": "aa2846680fa9a2032939d720487942567fd9eb63",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/691193879d96bdfd1e6ab5ebcca2fadc7604cf34.tar.gz?rev=691193879d96bdfd1e6ab5ebcca2fadc7604cf34"
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/aa2846680fa9a2032939d720487942567fd9eb63.tar.gz?rev=aa2846680fa9a2032939d720487942567fd9eb63"
},
"original": {
"type": "tarball",
@ -299,11 +299,11 @@
},
"nix-flatpak": {
"locked": {
"lastModified": 1730108712,
"narHash": "sha256-vIvmXmjAQIY39hACGFe/cdBK2r3ZprpHLwX2HIy7Mj8=",
"lastModified": 1732304879,
"narHash": "sha256-/DOW8VadE//HA6tuV2++NowYWi7Wa/FmJHXRJoTQnfQ=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "1cba177bb0a948c919af7596e40bef307543d40a",
"rev": "c84579946c03c996916be0fb6e1340f444c277af",
"type": "github"
},
"original": {
@ -357,11 +357,11 @@
]
},
"locked": {
"lastModified": 1731209121,
"narHash": "sha256-BF7FBh1hIYPDihdUlImHGsQzaJZVLLfYqfDx41wjuF0=",
"lastModified": 1732458224,
"narHash": "sha256-6CHj+ce0yGOEuKbM0gERuNkLAOrkmcmw5kLYHaW8eMw=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "896019f04b22ce5db4c0ee4f89978694f44345c3",
"rev": "e5105f148c36e423377c6be187186b5bf706c268",
"type": "github"
},
"original": {
@ -377,11 +377,11 @@
]
},
"locked": {
"lastModified": 1731209121,
"narHash": "sha256-BF7FBh1hIYPDihdUlImHGsQzaJZVLLfYqfDx41wjuF0=",
"lastModified": 1732458224,
"narHash": "sha256-6CHj+ce0yGOEuKbM0gERuNkLAOrkmcmw5kLYHaW8eMw=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "896019f04b22ce5db4c0ee4f89978694f44345c3",
"rev": "e5105f148c36e423377c6be187186b5bf706c268",
"type": "github"
},
"original": {
@ -399,11 +399,11 @@
]
},
"locked": {
"lastModified": 1731375802,
"narHash": "sha256-CvWPEzrl2EA3xrtg9X6K8aqV7T5r0SaDz6PLpGA0yIY=",
"lastModified": 1732413484,
"narHash": "sha256-KZYNKQVAf53MvT4zs8ybtswyJUw5f1HzshZWgCDJQm4=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
"rev": "b873a123366b9a62f9262414ada8d83b03f1f0bf",
"rev": "a950aa08f1868355d8b5fe89613f17468d2ae697",
"type": "github"
},
"original": {
@ -414,11 +414,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1731332224,
"narHash": "sha256-0ctfVp27ingWtY7dbP5+QpSQ98HaOZleU0teyHQUAw0=",
"lastModified": 1731797098,
"narHash": "sha256-UhWmEZhwJZmVZ1jfHZFzCg+ZLO9Tb/v3Y6LC0UNyeTo=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "184687ae1a3139faa4746168baf071f60d0310c8",
"rev": "672ac2ac86f7dff2f6f3406405bddecf960e0db6",
"type": "github"
},
"original": {
@ -430,11 +430,11 @@
},
"nixpkgs-raw": {
"locked": {
"lastModified": 1731239293,
"narHash": "sha256-q2yjIWFFcTzp5REWQUOU9L6kHdCDmFDpqeix86SOvDc=",
"lastModified": 1731797254,
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9256f7c71a195ebe7a218043d9f93390d49e6884",
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
"type": "github"
},
"original": {
@ -445,11 +445,11 @@
},
"nixpkgs-unstable-raw": {
"locked": {
"lastModified": 1731139594,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"type": "github"
},
"original": {
@ -460,11 +460,11 @@
},
"nur": {
"locked": {
"lastModified": 1731401176,
"narHash": "sha256-khh5dM0oofqK3wmoL3xD09DokRg8E2XpkeEoOK6ShBg=",
"lastModified": 1732461014,
"narHash": "sha256-4KMZSCldwLImqrGxj8o5VpW5ej0L+EmxrlJzG2na8t4=",
"owner": "nix-community",
"repo": "NUR",
"rev": "1f5438e9803717a9bbce8b54356e305b87f1fde5",
"rev": "5951bcd835d728eb0db62425dba44a79d83c75d0",
"type": "github"
},
"original": {
@ -483,11 +483,11 @@
]
},
"locked": {
"lastModified": 1731193165,
"narHash": "sha256-pGF8L5g9QpkQtJP9JmNIRNZfcyhJHf7uT+d8tqI1h6Y=",
"lastModified": 1732450735,
"narHash": "sha256-QWNkWawDjoVWZx8bFUYxaCynK/r3+JyttzQ3TBoXaDg=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "f33173b9d22e554a6f869626bc01808d35995257",
"rev": "8e75ad96bfcc1a4da33b51c8a82adc146b2be011",
"type": "github"
},
"original": {

View file

@ -99,8 +99,7 @@
name = "patched-nixpkgs-unstable";
src = nixpkgs-unstable-raw;
patches = [
./nixpkgs-patches/handheld-daemon-ui-init.patch
./nixpkgs-patches/pr306227.patch
./nixpkgs-patches/pr357897.patch
];
};
nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches {

View file

@ -1,326 +0,0 @@
From 18cd88064d152491d5ba19602db5c5d65bc2d685 Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Thu, 18 Apr 2024 11:22:24 +0200
Subject: [PATCH 01/10] handheld-daemon-ui: init at 3.1.1
---
.../by-name/ha/handheld-daemon-ui/package.nix | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 pkgs/by-name/ha/handheld-daemon-ui/package.nix
diff --git a/pkgs/by-name/ha/handheld-daemon-ui/package.nix b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
new file mode 100644
index 0000000000000..81d318d88b5ab
--- /dev/null
+++ b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
@@ -0,0 +1,39 @@
+{
+ lib,
+ appimageTools,
+ fetchurl,
+}:
+let
+ pname = "handheld-daemon-ui";
+ version = "3.1.1";
+
+ src = fetchurl {
+ url = "https://github.com/hhd-dev/hhd-ui/releases/download/v${version}/hhd-ui.Appimage";
+ hash = "sha256-KH01MvcCbvCqjp1UZHnwfh9G3Yh50CO9Ecjl1Y8VY9E=";
+ };
+ extractedFiles = appimageTools.extractType2 { inherit pname version src; };
+in
+appimageTools.wrapType2 {
+ inherit pname version src;
+
+ extraInstallCommands = ''
+ # Handheld-daemon expects the UI binary to be called hhd-ui
+ mv $out/bin/${pname} $out/bin/hhd-ui
+
+ mkdir -p $out/share/applications
+ substitute ${extractedFiles}/hhd-ui.desktop \
+ $out/share/applications/hhd-ui.desktop \
+ --replace-fail "Exec=AppRun" "Exec=hhd-ui"
+ cp ${extractedFiles}/usr/share/icons $out/share -r
+ '';
+
+ meta = with lib; {
+ description = "The main UI for the Handheld Daemon";
+ homepage = "https://github.com/hhd-dev/hhd-ui";
+ license = licenses.gpl3Only;
+ maintainers = with maintainers; [ toast ];
+ mainProgram = "hhd-ui";
+ platforms = [ "x86_64-linux" ];
+ sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+ };
+}
From 49fc133081344cbe155eefd7189a6cff2e8b6c6b Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Wed, 10 Jul 2024 12:59:01 +0200
Subject: [PATCH 02/10] nixos/handheld-daemon: add options for
handheld-daemon-ui
---
.../modules/services/hardware/handheld-daemon.nix | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/nixos/modules/services/hardware/handheld-daemon.nix b/nixos/modules/services/hardware/handheld-daemon.nix
index 6c9d5aa3e22c8..e8e283bca8941 100644
--- a/nixos/modules/services/hardware/handheld-daemon.nix
+++ b/nixos/modules/services/hardware/handheld-daemon.nix
@@ -11,6 +11,11 @@ in
enable = mkEnableOption "Enable Handheld Daemon";
package = mkPackageOption pkgs "handheld-daemon" { };
+ ui = {
+ enable = mkEnableOption "Handheld Daemon UI";
+ package = mkPackageOption pkgs "handheld-daemon-ui" { };
+ };
+
user = mkOption {
type = types.str;
description = ''
@@ -20,7 +25,10 @@ in
};
config = mkIf cfg.enable {
- environment.systemPackages = [ cfg.package ];
+ environment.systemPackages = [
+ cfg.package
+ (mkIf cfg.ui.enable cfg.ui.package)
+ ];
services.udev.packages = [ cfg.package ];
systemd.packages = [ cfg.package ];
@@ -31,6 +39,11 @@ in
restartIfChanged = true;
+ path = mkIf cfg.ui.enable [
+ pkgs.handheld-daemon-ui
+ pkgs.lsof
+ ];
+
serviceConfig = {
ExecStart = "${ lib.getExe cfg.package } --user ${ cfg.user }";
Nice = "-12";
From a8cbef4271d515e2733f3f9a32843135e3d255a5 Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Thu, 11 Jul 2024 12:11:00 +0200
Subject: [PATCH 03/10] nixos/handheld-daemon: enable ui when enabling
handheld-daemon
---
nixos/modules/services/hardware/handheld-daemon.nix | 1 +
1 file changed, 1 insertion(+)
diff --git a/nixos/modules/services/hardware/handheld-daemon.nix b/nixos/modules/services/hardware/handheld-daemon.nix
index e8e283bca8941..d78bae5e9bc48 100644
--- a/nixos/modules/services/hardware/handheld-daemon.nix
+++ b/nixos/modules/services/hardware/handheld-daemon.nix
@@ -25,6 +25,7 @@ in
};
config = mkIf cfg.enable {
+ services.handheld-daemon.ui.enable = mkDefault true;
environment.systemPackages = [
cfg.package
(mkIf cfg.ui.enable cfg.ui.package)
From 76e8f25d02d909e23dfb00bd02cb276dc4cf5c1c Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Tue, 8 Oct 2024 10:51:00 +0200
Subject: [PATCH 04/10] handheld-daemon-ui: 3.1.1 -> 3.2.1
---
pkgs/by-name/ha/handheld-daemon-ui/package.nix | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pkgs/by-name/ha/handheld-daemon-ui/package.nix b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
index 81d318d88b5ab..028ceeb58f05e 100644
--- a/pkgs/by-name/ha/handheld-daemon-ui/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
@@ -5,11 +5,11 @@
}:
let
pname = "handheld-daemon-ui";
- version = "3.1.1";
+ version = "3.2.1";
src = fetchurl {
url = "https://github.com/hhd-dev/hhd-ui/releases/download/v${version}/hhd-ui.Appimage";
- hash = "sha256-KH01MvcCbvCqjp1UZHnwfh9G3Yh50CO9Ecjl1Y8VY9E=";
+ hash = "sha256-RRXVoeWOO/pR+CAEY0J6Buf/RhA+G0PdxGQVMdAHfwA=";
};
extractedFiles = appimageTools.extractType2 { inherit pname version src; };
in
@@ -18,7 +18,7 @@ appimageTools.wrapType2 {
extraInstallCommands = ''
# Handheld-daemon expects the UI binary to be called hhd-ui
- mv $out/bin/${pname} $out/bin/hhd-ui
+ mv $out/bin/${pname}* $out/bin/hhd-ui
mkdir -p $out/share/applications
substitute ${extractedFiles}/hhd-ui.desktop \
From 1843526bfdf5b5015ab9a070cfad122ec4cfb290 Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Tue, 8 Oct 2024 11:14:00 +0200
Subject: [PATCH 05/10] handheld-daemon-ui: fix desktop item category
---
pkgs/by-name/ha/handheld-daemon-ui/package.nix | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pkgs/by-name/ha/handheld-daemon-ui/package.nix b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
index 028ceeb58f05e..1aa8266ece448 100644
--- a/pkgs/by-name/ha/handheld-daemon-ui/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
@@ -23,7 +23,8 @@ appimageTools.wrapType2 {
mkdir -p $out/share/applications
substitute ${extractedFiles}/hhd-ui.desktop \
$out/share/applications/hhd-ui.desktop \
- --replace-fail "Exec=AppRun" "Exec=hhd-ui"
+ --replace-fail "Exec=AppRun" "Exec=hhd-ui" \
+ --replace-fail "Categories=game;" "Categories=Game;"
cp ${extractedFiles}/usr/share/icons $out/share -r
'';
From 9ff4790805b08d7b0ff1d501606eb4ee2c28f675 Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Tue, 8 Oct 2024 11:40:05 +0200
Subject: [PATCH 06/10] handheld-daemon-ui: copy icon to correct folder
---
pkgs/by-name/ha/handheld-daemon-ui/package.nix | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pkgs/by-name/ha/handheld-daemon-ui/package.nix b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
index 1aa8266ece448..a1131ea5c23d6 100644
--- a/pkgs/by-name/ha/handheld-daemon-ui/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
@@ -25,7 +25,9 @@ appimageTools.wrapType2 {
$out/share/applications/hhd-ui.desktop \
--replace-fail "Exec=AppRun" "Exec=hhd-ui" \
--replace-fail "Categories=game;" "Categories=Game;"
- cp ${extractedFiles}/usr/share/icons $out/share -r
+ iconDir=$out/share/icons/hicolor/512x512/apps
+ mkdir -p $iconDir
+ cp ${extractedFiles}/hhd-ui.png $iconDir
'';
meta = with lib; {
From b70ac1d16444ae765c3273acb5a3bab27cdc06c6 Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Tue, 8 Oct 2024 18:47:43 +0200
Subject: [PATCH 07/10] nixos/handheld-daemon: replace mkIf with lib.optional
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
---
nixos/modules/services/hardware/handheld-daemon.nix | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/nixos/modules/services/hardware/handheld-daemon.nix b/nixos/modules/services/hardware/handheld-daemon.nix
index d78bae5e9bc48..02684426b578d 100644
--- a/nixos/modules/services/hardware/handheld-daemon.nix
+++ b/nixos/modules/services/hardware/handheld-daemon.nix
@@ -28,8 +28,7 @@ in
services.handheld-daemon.ui.enable = mkDefault true;
environment.systemPackages = [
cfg.package
- (mkIf cfg.ui.enable cfg.ui.package)
- ];
+ ] ++ lib.optional cfg.ui.enable cfg.ui.package;
services.udev.packages = [ cfg.package ];
systemd.packages = [ cfg.package ];
From ac8bb4e8ba115162e7140a47b55c0264ec8d830b Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Thu, 10 Oct 2024 11:08:48 +0200
Subject: [PATCH 08/10] nixos/handheld-daemon: add correct ui package to
service path
---
nixos/modules/services/hardware/handheld-daemon.nix | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nixos/modules/services/hardware/handheld-daemon.nix b/nixos/modules/services/hardware/handheld-daemon.nix
index 02684426b578d..cb20682ec592e 100644
--- a/nixos/modules/services/hardware/handheld-daemon.nix
+++ b/nixos/modules/services/hardware/handheld-daemon.nix
@@ -40,7 +40,7 @@ in
restartIfChanged = true;
path = mkIf cfg.ui.enable [
- pkgs.handheld-daemon-ui
+ cfg.ui.package
pkgs.lsof
];
From 4f5a6840aed497f33ad61cd3a629288cde8c6dd2 Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Wed, 6 Nov 2024 22:36:59 +0100
Subject: [PATCH 09/10] handheld-daemon-ui: get rid off 'with lib'
Co-authored-by: Arne Keller <2012gdwu+github@posteo.de>
---
pkgs/by-name/ha/handheld-daemon-ui/package.nix | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pkgs/by-name/ha/handheld-daemon-ui/package.nix b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
index a1131ea5c23d6..92946c9fe0cd2 100644
--- a/pkgs/by-name/ha/handheld-daemon-ui/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
@@ -30,13 +30,13 @@ appimageTools.wrapType2 {
cp ${extractedFiles}/hhd-ui.png $iconDir
'';
- meta = with lib; {
- description = "The main UI for the Handheld Daemon";
+ meta = {
+ description = "UI for the Handheld Daemon";
homepage = "https://github.com/hhd-dev/hhd-ui";
- license = licenses.gpl3Only;
- maintainers = with maintainers; [ toast ];
+ license = lib.licenses.gpl3Only;
+ maintainers = with lib.maintainers; [ toast ];
mainProgram = "hhd-ui";
platforms = [ "x86_64-linux" ];
- sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+ sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}
From fb63f605c5a14c23d596d070fffc9e89da59526e Mon Sep 17 00:00:00 2001
From: Toast <39011842+toast003@users.noreply.github.com>
Date: Fri, 15 Nov 2024 10:49:15 +0100
Subject: [PATCH 10/10] handheld-daemon-ui: 3.2.1 -> 3.2.3
---
pkgs/by-name/ha/handheld-daemon-ui/package.nix | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkgs/by-name/ha/handheld-daemon-ui/package.nix b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
index 92946c9fe0cd2..00c830bd3fc67 100644
--- a/pkgs/by-name/ha/handheld-daemon-ui/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon-ui/package.nix
@@ -5,11 +5,11 @@
}:
let
pname = "handheld-daemon-ui";
- version = "3.2.1";
+ version = "3.2.3";
src = fetchurl {
url = "https://github.com/hhd-dev/hhd-ui/releases/download/v${version}/hhd-ui.Appimage";
- hash = "sha256-RRXVoeWOO/pR+CAEY0J6Buf/RhA+G0PdxGQVMdAHfwA=";
+ hash = "sha256-VhJrOvE+BebJIAeQlwOOsPfqSrvBnJQavGT7glTrG2o=";
};
extractedFiles = appimageTools.extractType2 { inherit pname version src; };
in

View file

@ -1,24 +0,0 @@
From 8abd7b32202df6c492446edb05ef925af1515e18 Mon Sep 17 00:00:00 2001
From: Dmitry Chermnykh <76gh6rvso@relay.firefox.com>
Date: Tue, 23 Apr 2024 14:00:40 +0500
Subject: [PATCH] nixos/plasma6: add qtimageformats to the requiredPackages
This is needed for qt6 apps to be able to work with certain image formats such as .webp and .avif
Closes https://github.com/NixOS/nixpkgs/issues/304523
---
nixos/modules/services/desktop-managers/plasma6.nix | 1 +
1 file changed, 1 insertion(+)
diff --git a/nixos/modules/services/desktop-managers/plasma6.nix b/nixos/modules/services/desktop-managers/plasma6.nix
index 856d36b8a3030..d102ef167e314 100644
--- a/nixos/modules/services/desktop-managers/plasma6.nix
+++ b/nixos/modules/services/desktop-managers/plasma6.nix
@@ -74,6 +74,7 @@ in {
kguiaddons # provides geo URL handlers
kiconthemes # provides Qt plugins
kimageformats # provides Qt plugins
+ qtimageformats # provides optional image formats such as .webp and .avif
kio # provides helper service + a bunch of other stuff
kpackage # provides kpackagetool tool
kservice # provides kbuildsycoca6 tool

View file

@ -0,0 +1,145 @@
From 91c18e48e58517b176e8b87959293de71789c715 Mon Sep 17 00:00:00 2001
From: GetPsyched <priyanshu@getpsyched.dev>
Date: Thu, 21 Nov 2024 17:03:57 +0400
Subject: [PATCH] nixos-render-docs: don't validate redirects if none were
given
---
.../src/nixos_render_docs/manual.py | 40 ++++++++++---------
.../src/tests/test_auto_id_prefix.py | 6 +--
2 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/pkgs/by-name/ni/nixos-render-docs/src/nixos_render_docs/manual.py b/pkgs/by-name/ni/nixos-render-docs/src/nixos_render_docs/manual.py
index 64b3740c83522..52b51f63f4d85 100644
--- a/pkgs/by-name/ni/nixos-render-docs/src/nixos_render_docs/manual.py
+++ b/pkgs/by-name/ni/nixos-render-docs/src/nixos_render_docs/manual.py
@@ -217,11 +217,11 @@ class ManualHTMLRenderer(RendererMixin, HTMLRenderer):
_base_path: Path
_in_dir: Path
_html_params: HTMLParameters
- _redirects: Redirects
+ _redirects: Redirects | None
def __init__(self, toplevel_tag: str, revision: str, html_params: HTMLParameters,
manpage_urls: Mapping[str, str], xref_targets: dict[str, XrefTarget],
- redirects: Redirects, in_dir: Path, base_path: Path):
+ redirects: Redirects | None, in_dir: Path, base_path: Path):
super().__init__(toplevel_tag, revision, manpage_urls, xref_targets)
self._in_dir = in_dir
self._base_path = base_path.absolute()
@@ -310,9 +310,12 @@ def _file_header(self, toc: TocEntry) -> str:
' </div>',
])
- redirects_path = f'{self._base_path}/{toc.target.path.split('.html')[0]}-redirects.js'
- with open(redirects_path, 'w') as file:
- file.write(self._redirects.get_redirect_script(toc.target.path))
+ scripts = self._html_params.scripts
+ if self._redirects:
+ redirects_path = f'{self._base_path}/{toc.target.path.split('.html')[0]}-redirects.js'
+ with open(redirects_path, 'w') as file:
+ file.write(self._redirects.get_redirect_script(toc.target.path))
+ scripts.append(redirects_path)
return "\n".join([
'<?xml version="1.0" encoding="utf-8" standalone="no"?>',
@@ -325,7 +328,7 @@ def _file_header(self, toc: TocEntry) -> str:
"".join((f'<link rel="stylesheet" type="text/css" href="{html.escape(style, True)}" />'
for style in self._html_params.stylesheets)),
"".join((f'<script src="{html.escape(script, True)}" type="text/javascript"></script>'
- for script in [*self._html_params.scripts, redirects_path])),
+ for script in scripts)),
f' <meta name="generator" content="{html.escape(self._html_params.generator, True)}" />',
f' <link rel="home" href="{home.target.href()}" title="{home.target.title}" />' if home.target.href() else "",
f' {up_link}{prev_link}{next_link}',
@@ -509,7 +512,7 @@ class HTMLConverter(BaseConverter[ManualHTMLRenderer]):
_revision: str
_html_params: HTMLParameters
_manpage_urls: Mapping[str, str]
- _redirects: Redirects
+ _redirects: Redirects | None
_xref_targets: dict[str, XrefTarget]
_redirection_targets: set[str]
_appendix_count: int = 0
@@ -518,7 +521,7 @@ def _next_appendix_id(self) -> str:
self._appendix_count += 1
return _to_base26(self._appendix_count - 1)
- def __init__(self, revision: str, html_params: HTMLParameters, manpage_urls: Mapping[str, str], redirects: Redirects):
+ def __init__(self, revision: str, html_params: HTMLParameters, manpage_urls: Mapping[str, str], redirects: Redirects | None = None):
super().__init__()
self._revision, self._html_params, self._manpage_urls, self._redirects = revision, html_params, manpage_urls, redirects
self._xref_targets = {}
@@ -679,13 +682,14 @@ def _postprocess(self, infile: Path, outfile: Path, tokens: Sequence[Token]) ->
)
TocEntry.collect_and_link(self._xref_targets, tokens)
- self._redirects.validate(self._xref_targets)
- server_redirects = self._redirects.get_server_redirects()
- with open(outfile.parent / '_redirects', 'w') as server_redirects_file:
- formatted_server_redirects = []
- for from_path, to_path in server_redirects.items():
- formatted_server_redirects.append(f"{from_path} {to_path} 301")
- server_redirects_file.write("\n".join(formatted_server_redirects))
+ if self._redirects:
+ self._redirects.validate(self._xref_targets)
+ server_redirects = self._redirects.get_server_redirects()
+ with open(outfile.parent / '_redirects', 'w') as server_redirects_file:
+ formatted_server_redirects = []
+ for from_path, to_path in server_redirects.items():
+ formatted_server_redirects.append(f"{from_path} {to_path} 301")
+ server_redirects_file.write("\n".join(formatted_server_redirects))
def _build_cli_html(p: argparse.ArgumentParser) -> None:
@@ -704,16 +708,16 @@ def _build_cli_html(p: argparse.ArgumentParser) -> None:
def _run_cli_html(args: argparse.Namespace) -> None:
with open(args.manpage_urls) as manpage_urls, open(Path(__file__).parent / "redirects.js") as redirects_script:
- redirects = {}
+ redirects = None
if args.redirects:
with open(args.redirects) as raw_redirects:
- redirects = json.load(raw_redirects)
+ redirects = Redirects(json.load(raw_redirects), redirects_script.read())
md = HTMLConverter(
args.revision,
HTMLParameters(args.generator, args.stylesheet, args.script, args.toc_depth,
args.chunk_toc_depth, args.section_toc_depth, args.media_dir),
- json.load(manpage_urls), Redirects(redirects, redirects_script.read()))
+ json.load(manpage_urls), redirects)
md.convert(args.infile, args.outfile)
def build_cli(p: argparse.ArgumentParser) -> None:
diff --git a/pkgs/by-name/ni/nixos-render-docs/src/tests/test_auto_id_prefix.py b/pkgs/by-name/ni/nixos-render-docs/src/tests/test_auto_id_prefix.py
index a3d33930b3035..ae847de6b8a8d 100644
--- a/pkgs/by-name/ni/nixos-render-docs/src/tests/test_auto_id_prefix.py
+++ b/pkgs/by-name/ni/nixos-render-docs/src/tests/test_auto_id_prefix.py
@@ -11,7 +11,7 @@ def set_prefix(token: Token, ident: str) -> None:
def test_auto_id_prefix_simple() -> None:
- md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {}, Redirects({}, ''))
+ md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {})
src = f"""
# title
@@ -32,7 +32,7 @@ def test_auto_id_prefix_simple() -> None:
def test_auto_id_prefix_repeated() -> None:
- md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {}, Redirects({}, ''))
+ md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {})
src = f"""
# title
@@ -58,7 +58,7 @@ def test_auto_id_prefix_repeated() -> None:
]
def test_auto_id_prefix_maximum_nested() -> None:
- md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {}, Redirects({}, ''))
+ md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {})
src = f"""
# h1