diff --git a/flake.lock b/flake.lock index 9ab690f9..dd09b32c 100644 --- a/flake.lock +++ b/flake.lock @@ -1,38 +1,5 @@ { "nodes": { - "all-cabal-json": { - "flake": false, - "locked": { - "lastModified": 1665552503, - "narHash": "sha256-r14RmRSwzv5c+bWKUDaze6pXM7nOsiz1H8nvFHJvufc=", - "owner": "nix-community", - "repo": "all-cabal-json", - "rev": "d7c0434eebffb305071404edcf9d5cd99703878e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "hackage", - "repo": "all-cabal-json", - "type": "github" - } - }, - "crane": { - "flake": false, - "locked": { - "lastModified": 1670900067, - "narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=", - "owner": "ipetkov", - "repo": "crane", - "rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, "devshell": { "flake": false, "locked": { @@ -51,34 +18,21 @@ }, "dream2nix": { "inputs": { - "all-cabal-json": "all-cabal-json", - "crane": "crane", "devshell": "devshell", - "drv-parts": "drv-parts", "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "flake-utils-pre-commit": "flake-utils-pre-commit", - "ghc-utils": "ghc-utils", - "gomod2nix": "gomod2nix", - "mach-nix": "mach-nix", - "nix-pypi-fetcher": "nix-pypi-fetcher", "nixpkgs": [ "nixpkgs" ], - "nixpkgsV1": [ - "nixpkgs" - ], - "poetry2nix": "poetry2nix", - "pre-commit-hooks": "pre-commit-hooks", - "pruned-racket-catalog": "pruned-racket-catalog" + "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1680605243, - "narHash": "sha256-dUrxj653kcLvjNKRI7NoTJoj+Q7G+vOYsl4iuwtnIWo=", - "owner": "nix-community", - "repo": "dream2nix", - "rev": "34a80ab215f1f24068ea9c76f3a7e5bc19478653", - "type": "github" + "dirtyRev": "f1baa1ebdd1ea12f931f22cd807e140af52d826d-dirty", + "dirtyShortRev": "f1baa1eb-dirty", + "lastModified": 1692271221, + "narHash": "sha256-5ijumVS8SWQrOAGFwOt9HSIbI0m875O9isseC6rE9Eo=", + "type": "git", + "url": "file:///home/grmpf/projects/github/dream2nix" }, "original": { "owner": "nix-community", @@ -86,35 +40,6 @@ "type": "github" } }, - "drv-parts": { - "inputs": { - "flake-compat": [ - "dream2nix", - "flake-compat" - ], - "flake-parts": [ - "dream2nix", - "flake-parts" - ], - "nixpkgs": [ - "dream2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1680172861, - "narHash": "sha256-QMyI338xRxaHFDlCXdLCtgelGQX2PdlagZALky4ZXJ8=", - "owner": "davhau", - "repo": "drv-parts", - "rev": "ced8a52f62b0a94244713df2225c05c85b416110", - "type": "github" - }, - "original": { - "owner": "davhau", - "repo": "drv-parts", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -212,12 +137,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667077288, - "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -226,13 +154,13 @@ "type": "github" } }, - "flake-utils-pre-commit": { + "flake-utils_2": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1667077288, + "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817", "type": "github" }, "original": { @@ -241,38 +169,6 @@ "type": "github" } }, - "ghc-utils": { - "flake": false, - "locked": { - "lastModified": 1662774800, - "narHash": "sha256-1Rd2eohGUw/s1tfvkepeYpg8kCEXiIot0RijapUjAkE=", - "ref": "refs/heads/master", - "rev": "bb3a2d3dc52ff0253fb9c2812bd7aa2da03e0fea", - "revCount": 1072, - "type": "git", - "url": "https://gitlab.haskell.org/bgamari/ghc-utils" - }, - "original": { - "type": "git", - "url": "https://gitlab.haskell.org/bgamari/ghc-utils" - } - }, - "gomod2nix": { - "flake": false, - "locked": { - "lastModified": 1627572165, - "narHash": "sha256-MFpwnkvQpauj799b4QTBJQFEddbD02+Ln5k92QyHOSk=", - "owner": "tweag", - "repo": "gomod2nix", - "rev": "67f22dd738d092c6ba88e420350ada0ed4992ae8", - "type": "github" - }, - "original": { - "owner": "tweag", - "repo": "gomod2nix", - "type": "github" - } - }, "hercules-ci-agent": { "inputs": { "flake-parts": "flake-parts_4", @@ -349,21 +245,6 @@ "type": "github" } }, - "mach-nix": { - "flake": false, - "locked": { - "lastModified": 1634711045, - "narHash": "sha256-m5A2Ty88NChLyFhXucECj6+AuiMZPHXNbw+9Kcs7F6Y=", - "owner": "DavHau", - "repo": "mach-nix", - "rev": "4433f74a97b94b596fa6cd9b9c0402104aceef5d", - "type": "github" - }, - "original": { - "id": "mach-nix", - "type": "indirect" - } - }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -386,22 +267,6 @@ "type": "github" } }, - "nix-pypi-fetcher": { - "flake": false, - "locked": { - "lastModified": 1669065297, - "narHash": "sha256-UStjXjNIuIm7SzMOWvuYWIHBkPUKQ8Id63BMJjnIDoA=", - "owner": "DavHau", - "repo": "nix-pypi-fetcher", - "rev": "a9885ac6a091576b5195d547ac743d45a2a615ac", - "type": "github" - }, - "original": { - "owner": "DavHau", - "repo": "nix-pypi-fetcher", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1672262501, @@ -452,29 +317,9 @@ "type": "github" } }, - "poetry2nix": { - "flake": false, - "locked": { - "lastModified": 1666918719, - "narHash": "sha256-BkK42fjAku+2WgCOv2/1NrPa754eQPV7gPBmoKQBWlc=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "289efb187123656a116b915206e66852f038720e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "1.36.0", - "repo": "poetry2nix", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { - "flake-utils": [ - "dream2nix", - "flake-utils-pre-commit" - ], + "flake-utils": "flake-utils", "nixpkgs": [ "dream2nix", "nixpkgs" @@ -496,7 +341,7 @@ }, "pre-commit-hooks-nix": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "hercules-ci-effects", "hercules-ci-agent", @@ -517,23 +362,6 @@ "type": "github" } }, - "pruned-racket-catalog": { - "flake": false, - "locked": { - "lastModified": 1672537287, - "narHash": "sha256-SuOvXVcLfakw18oJB/PuRMyvGyGG1+CQD3R+TGHIv44=", - "owner": "nix-community", - "repo": "pruned-racket-catalog", - "rev": "c8b89557fb53b36efa2ee48a769c7364df0f6262", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "catalog", - "repo": "pruned-racket-catalog", - "type": "github" - } - }, "root": { "inputs": { "dream2nix": "dream2nix", @@ -543,6 +371,21 @@ "koboldai-src": "koboldai-src", "nixpkgs": "nixpkgs_2" } + }, + "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", diff --git a/projects/invokeai/default.nix b/projects/invokeai/default.nix index c9d5e001..254ff9fe 100644 --- a/projects/invokeai/default.nix +++ b/projects/invokeai/default.nix @@ -13,6 +13,20 @@ lock.lockFileRel = "/projects/invokeai/lock-${config.deps.stdenv.system}.json"; }; + _callModule = module: + lib.evalModules { + specialArgs.dream2nix = inputs.dream2nix; + specialArgs.packageSets.nixpkgs = pkgs; + specialArgs.inputs = {inherit (inputs) invokeai-src;}; + modules = [ + module + dream2nix-setup-module + ]; + }; + + # like callPackage for modules + callModule = module: (_callModule module).config.public; + in { packages = { invokeai-amd = mkInvokeAIVariant { @@ -21,14 +35,7 @@ invokeai-nvidia = mkInvokeAIVariant { aipython3 = aipython3-nvidia; }; - invokeai-d2n = inputs.dream2nix.lib.evalModules { - modules = [ - dream2nix-setup-module - ./package-d2n.nix - ]; - packageSets.nixpkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; - specialArgs.inputs = {inherit (inputs) invokeai-src;}; - }; + invokeai-d2n = callModule ./package-d2n.nix; }; }; diff --git a/projects/invokeai/package-d2n.nix b/projects/invokeai/package-d2n.nix index ae6190c9..7f61e41f 100644 --- a/projects/invokeai/package-d2n.nix +++ b/projects/invokeai/package-d2n.nix @@ -12,7 +12,7 @@ in { imports = [ - dream2nix.modules.drv-parts.mach-nix-xs + dream2nix.modules.drv-parts.pip ]; name = "invokeai"; @@ -81,56 +81,56 @@ in { ]; }; - mach-nix.pythonSources.fetch-pip = { + pip = { pypiSnapshotDate = "2023-04-02"; # remove last (windows only) requirement due to dream2nix splitting issue requirementsList = lib.init pyproject.project.dependencies; }; - mach-nix.manualSetupDeps = { - basicsr = [ - "lmdb" - "yapf" - "tb-nightly" - "tqdm" - "scikit-image" - "scipy" - "opencv-python" - ]; - }; + # mach-nix.manualSetupDeps = { + # basicsr = [ + # "lmdb" + # "yapf" + # "tb-nightly" + # "tqdm" + # "scikit-image" + # "scipy" + # "opencv-python" + # ]; + # }; - mach-nix.drvs = { - antlr4-python3-runtime.nixpkgs-overrides.enable = false; - test-tube = { - mkDerivation.doCheck = false; - mkDerivation.doInstallCheck = false; - }; + # mach-nix.drvs = { + # antlr4-python3-runtime.nixpkgs-overrides.enable = false; + # test-tube = { + # mkDerivation.doCheck = false; + # mkDerivation.doInstallCheck = false; + # }; - urwid = { - mkDerivation.doCheck = lib.mkForce false; - }; + # urwid = { + # mkDerivation.doCheck = lib.mkForce false; + # }; - filterpy = { - mkDerivation.doCheck = false; - }; + # filterpy = { + # mkDerivation.doCheck = false; + # }; - basicsr = { - mkDerivation = { - nativeBuildInputs = [ - config.deps.python.pkgs.cython - config.deps.python.pkgs.numpy - config.deps.python.pkgs.torch - config.deps.breakpointHook - ]; - dontStrip = true; - doCheck = false; - }; - buildPythonPackage = { - pipInstallFlags = [ - "--ignore-installed" - ]; - catchConflicts = false; - }; - }; - }; + # basicsr = { + # mkDerivation = { + # nativeBuildInputs = [ + # config.deps.python.pkgs.cython + # config.deps.python.pkgs.numpy + # config.deps.python.pkgs.torch + # config.deps.breakpointHook + # ]; + # dontStrip = true; + # doCheck = false; + # }; + # buildPythonPackage = { + # pipInstallFlags = [ + # "--ignore-installed" + # ]; + # catchConflicts = false; + # }; + # }; + # }; }