funktionierende flake

This commit is contained in:
2026-01-03 16:19:08 +01:00
parent 23ba1f6f66
commit 7673bb28fd
2 changed files with 61 additions and 91 deletions
Generated
+6 -40
View File
@@ -1,59 +1,25 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1767325753, "lastModified": 1767116409,
"narHash": "sha256-yA/CuWyqm+AQo2ivGy6PlYrjZBQm7jfbe461+4HF2fo=", "narHash": "sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "64049ca74d63e971b627b5f3178d95642e61cedd", "rev": "cad22e7d996aea55ecab064e84834289143e44a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-25.11", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",
+55 -51
View File
@@ -1,63 +1,67 @@
{ {
description = "Navidrome Client Dev Environment"; description = "navidrome_client";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system: let
let system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
initClangScript = pkgs.writeShellScriptBin "init-clang" '' qtStyle = "Breeze";
if [ -f .clang-format ]; then in
echo "Fehler: .clang-format existiert bereits." {
else packages.${system}.default = pkgs.stdenv.mkDerivation {
${pkgs.clang-tools}/bin/clang-format -style=Google -dump-config > .clang-format pname = "navidrome-client";
echo "Erfolg: .clang-format (Google Style) wurde erstellt" version = "0.1";
fi src = self;
'';
in
{
devShells.default = pkgs.mkShell {
name = "Qt-Navidrome-Dev";
buildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
qtcreator cmake
cmake qt6.wrapQtAppsHook
ninja ];
gdb
pkg-config
clang-tools buildInputs =
initClangScript (with pkgs.qt6; [
qtbase
qtdeclarative
qtwayland
qtmultimedia
])
++ pkgs.lib.optionals (qtStyle == "Breeze") (with pkgs.kdePackages; [
kirigami
qqc2-breeze-style
]);
qt6.qtbase preFixup = ''
qt6.qtdeclarative qtWrapperArgs+=(--set QT_QUICK_CONTROLS_STYLE ${qtStyle})
qt6.qtmultimedia '';
qt6.qtsvg };
];
shellHook = '' apps.${system}.default = {
export name="Qt-Navidrome-Dev" type = "app";
program = "${self.packages.${system}.default}/bin/appnavidrome_client";
};
export CC=gcc devShells.${system}.default = pkgs.mkShell {
export CXX=g++ packages =
(with pkgs; [
alias ide='qtcreator . &' cmake
gdb
echo "Qt Creator: $(qtcreator -version 2>&1 | head -n 1 | cut -d ' ' -f 1-4)" qtcreator
echo "CMake: $(cmake --version | head -n 1)" ])
echo "GDB: $(gdb --version | head -n 1)" ++ (with pkgs.qt6; [
echo "Compiler: $(c++ --version | head -n 1)" qtbase
echo "" qtdeclarative
echo "'ide' um Qt Creator zu öffnen!" qtwayland
echo "" qtmultimedia
''; ])
}; ++ pkgs.lib.optionals (qtStyle == "Breeze") (with pkgs.kdePackages; [
} kirigami
); qqc2-breeze-style
]);
};
};
} }