when python meets nixos

This commit is contained in:
Aram Markarov
2026-02-14 17:03:35 +01:00
parent c5959c4d8e
commit 4286122a97
2 changed files with 63 additions and 56 deletions
+8 -5
View File
@@ -18,7 +18,12 @@
in {
formatter = forAllSystems (pkgs: pkgs.nixfmt);
packages = forAllSystems (pkgs: rec {
packages = forAllSystems (pkgs: let
pythonEnv = pkgs.python3.withPackages (ps: [
ps.pillow
ps.materialyoucolor
]);
in rec {
zshell = pkgs.callPackage ./nix {
rev = self.rev or self.dirtyRev;
stdenv = pkgs.clangStdenv;
@@ -27,6 +32,8 @@
withI3 = false;
};
app2unit = pkgs.callPackage ./nix/app2unit.nix {inherit pkgs;};
inherit pythonEnv;
};
default = zshell;
@@ -45,10 +52,6 @@
material-symbols
rubik
nerd-fonts.caskaydia-cove
(pkgs.python3.withPackages (python-pkgs: [
python-pkgs.pillow
python-pkgs.materialyoucolor
]))
];
};
});
+10 -6
View File
@@ -21,11 +21,12 @@
cmake,
ninja,
pkg-config,
}:
let
pythonEnv,
}: let
version = "1.0.0";
runtimeDeps = [
pythonEnv
app2unit
networkmanager
swappy
@@ -65,6 +66,7 @@ let
pkg-config
];
buildInputs = [
pythonEnv
qt6.qtbase
qt6.qtdeclarative
libqalculate
@@ -73,14 +75,15 @@ let
];
dontWrapQtApps = true;
cmakeFlags = [
cmakeFlags =
[
(lib.cmakeFeature "ENABLE_MODULES" "plugin")
(lib.cmakeFeature "INSTALL_QMLDIR" qt6.qtbase.qtQmlPrefix)
]
++ cmakeVersionFlags;
};
in
stdenv.mkDerivation {
stdenv.mkDerivation {
inherit version cmakeBuildType;
pname = "zshell";
src = ./..;
@@ -99,7 +102,8 @@ stdenv.mkDerivation {
];
propagatedBuildInputs = runtimeDeps;
cmakeFlags = [
cmakeFlags =
[
(lib.cmakeFeature "ENABLE_MODULES" "shell")
(lib.cmakeFeature "INSTALL_QSCONFDIR" "${placeholder "out"}/share/ZShell")
]
@@ -130,4 +134,4 @@ stdenv.mkDerivation {
license = lib.licenses.gpl3Only;
mainProgram = "zshell";
};
}
}