Gigahawk / nixos-inventree

InvenTree packaged for NixOS
4 stars 3 forks source link

Fails to build with unstable `nixpkgs` #2

Closed Pamplemousse closed 3 months ago

Pamplemousse commented 3 months ago

First of all, thanks for setting that up! I managed to get an inventree instance up and running rather easily thanks to this work :+1:

FYI, when using the unstable nixpkgs these days, the inventree package fails to build because its pythonPackages.mariadb dependency fails to build (c.f. NixOS/nixpkgs#332175). Note that it should be fixed by NixOS/nixpkgs#289256.

My temporary fix has been to fork this repository and use:

diff --git a/overlay.nix b/overlay.nix
index faa5cc1..87ad5a5 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -4,7 +4,7 @@ final: prev:
   inventree = rec {
     pythonOverrides = prev.callPackage ./python-overrides.nix { };
     customOverrides = prev.callPackage ./custom-overrides.nix { };
-    pythonBin = prev.python3.override {
+    pythonBin = prev.python311.override {
       packageOverrides = prev.lib.composeManyExtensions [
         (import ./maybe-overrides.nix)
         pythonOverrides
Pamplemousse commented 3 months ago

Probably fixed as https://github.com/NixOS/nixpkgs/pull/332473 got merged :partying_face: