funktionierende flake
This commit is contained in:
Generated
+6
-40
@@ -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",
|
||||||
|
|||||||
@@ -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
|
|
||||||
echo "Fehler: .clang-format existiert bereits."
|
|
||||||
else
|
|
||||||
${pkgs.clang-tools}/bin/clang-format -style=Google -dump-config > .clang-format
|
|
||||||
echo "Erfolg: .clang-format (Google Style) wurde erstellt"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell {
|
packages.${system}.default = pkgs.stdenv.mkDerivation {
|
||||||
name = "Qt-Navidrome-Dev";
|
pname = "navidrome-client";
|
||||||
|
version = "0.1";
|
||||||
|
src = self;
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
qtcreator
|
|
||||||
cmake
|
cmake
|
||||||
ninja
|
qt6.wrapQtAppsHook
|
||||||
gdb
|
|
||||||
pkg-config
|
|
||||||
|
|
||||||
clang-tools
|
|
||||||
initClangScript
|
|
||||||
|
|
||||||
qt6.qtbase
|
|
||||||
qt6.qtdeclarative
|
|
||||||
qt6.qtmultimedia
|
|
||||||
qt6.qtsvg
|
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
buildInputs =
|
||||||
export name="Qt-Navidrome-Dev"
|
(with pkgs.qt6; [
|
||||||
|
qtbase
|
||||||
|
qtdeclarative
|
||||||
|
qtwayland
|
||||||
|
qtmultimedia
|
||||||
|
])
|
||||||
|
++ pkgs.lib.optionals (qtStyle == "Breeze") (with pkgs.kdePackages; [
|
||||||
|
kirigami
|
||||||
|
qqc2-breeze-style
|
||||||
|
]);
|
||||||
|
|
||||||
export CC=gcc
|
preFixup = ''
|
||||||
export CXX=g++
|
qtWrapperArgs+=(--set QT_QUICK_CONTROLS_STYLE ${qtStyle})
|
||||||
|
|
||||||
alias ide='qtcreator . &'
|
|
||||||
|
|
||||||
echo "Qt Creator: $(qtcreator -version 2>&1 | head -n 1 | cut -d ' ' -f 1-4)"
|
|
||||||
echo "CMake: $(cmake --version | head -n 1)"
|
|
||||||
echo "GDB: $(gdb --version | head -n 1)"
|
|
||||||
echo "Compiler: $(c++ --version | head -n 1)"
|
|
||||||
echo ""
|
|
||||||
echo "'ide' um Qt Creator zu öffnen!"
|
|
||||||
echo ""
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
apps.${system}.default = {
|
||||||
|
type = "app";
|
||||||
|
program = "${self.packages.${system}.default}/bin/appnavidrome_client";
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
|
packages =
|
||||||
|
(with pkgs; [
|
||||||
|
cmake
|
||||||
|
gdb
|
||||||
|
qtcreator
|
||||||
|
])
|
||||||
|
++ (with pkgs.qt6; [
|
||||||
|
qtbase
|
||||||
|
qtdeclarative
|
||||||
|
qtwayland
|
||||||
|
qtmultimedia
|
||||||
|
])
|
||||||
|
++ pkgs.lib.optionals (qtStyle == "Breeze") (with pkgs.kdePackages; [
|
||||||
|
kirigami
|
||||||
|
qqc2-breeze-style
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user