From 605438538620dd736d7cf3f6ddfc5bbf8ec0e594 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sat, 31 May 2025 15:21:56 -0600 Subject: [PATCH] krita patch --- flake.lock | 179 +++---------------------------------------- modules/apps/art.nix | 12 ++- patches/libpng.patch | 15 ++++ 3 files changed, 36 insertions(+), 170 deletions(-) create mode 100644 patches/libpng.patch diff --git a/flake.lock b/flake.lock index 75d261f..35d1093 100644 --- a/flake.lock +++ b/flake.lock @@ -100,29 +100,6 @@ "type": "github" } }, - "chaotic": { - "inputs": { - "fenix": "fenix", - "flake-schemas": "flake-schemas", - "home-manager": "home-manager", - "jovian": "jovian", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1748622923, - "narHash": "sha256-UWxumIPPBxMl/UL9wu42M8SIDOzUscTc7CR7rgmxLrI=", - "owner": "chaotic-cx", - "repo": "nyx", - "rev": "b5d4ae9b00b7a3216b27ec824f6621145ecd238b", - "type": "github" - }, - "original": { - "owner": "chaotic-cx", - "ref": "nyxpkgs-unstable", - "repo": "nyx", - "type": "github" - } - }, "cpu-microcodes": { "flake": false, "locked": { @@ -200,28 +177,6 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": [ - "chaotic", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1748500877, - "narHash": "sha256-j4gxE8pBB5OzwuQYpX0+uhoT3KPYDTf1lEnxH/5UOhw=", - "owner": "nix-community", - "repo": "fenix", - "rev": "8c0499eb59f1c2c07b3734c210480623e1fe90a1", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -346,20 +301,6 @@ "type": "github" } }, - "flake-schemas": { - "locked": { - "lastModified": 1721999734, - "narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=", - "rev": "0a5c42297d870156d9c57d8f99e476b738dcd982", - "revCount": 75, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" - } - }, "fromYaml": { "flake": false, "locked": { @@ -464,27 +405,6 @@ } }, "home-manager": { - "inputs": { - "nixpkgs": [ - "chaotic", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748489961, - "narHash": "sha256-uGnudxMoQi2c8rpPoHXuQSm80NBqlOiNF4xdT3hhzLM=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "95c988cf08e9a5a8fe7cc275d5e3f24e9e87bd51", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -505,7 +425,7 @@ "type": "github" } }, - "home-manager_3": { + "home-manager_2": { "inputs": { "nixpkgs": [ "stylix", @@ -808,28 +728,6 @@ "url": "ssh://git@gitlab.com/CaptainJawZ/scripts-flake.git" } }, - "jovian": { - "inputs": { - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "chaotic", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748411314, - "narHash": "sha256-fvtRp+oHGDLiSQico9+LTAr6Z8CU1AIldLYLQ9mHqjo=", - "owner": "Jovian-Experiments", - "repo": "Jovian-NixOS", - "rev": "9d69aed9023082af370b71bffdfcd414b6b61593", - "type": "github" - }, - "original": { - "owner": "Jovian-Experiments", - "repo": "Jovian-NixOS", - "type": "github" - } - }, "nix-gaming": { "inputs": { "flake-parts": "flake-parts", @@ -851,41 +749,18 @@ "type": "github" } }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "chaotic", - "jovian", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729697500, - "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", - "owner": "zhaofengli", - "repo": "nix-github-actions", - "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", - "type": "github" - }, - "original": { - "owner": "zhaofengli", - "ref": "matrix-name", - "repo": "nix-github-actions", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1748460289, - "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=", - "owner": "NixOS", + "lastModified": 1748437600, + "narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102", + "rev": "7282cb574e0607e65224d33be8241eae7cfe0979", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", + "owner": "nixos", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -955,22 +830,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1748437600, - "narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7282cb574e0607e65224d33be8241eae7cfe0979", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixtendo-switch": { "inputs": { "flake-parts": "flake-parts_2", @@ -1065,13 +924,12 @@ }, "root": { "inputs": { - "chaotic": "chaotic", "doom-emacs": "doom-emacs", - "home-manager": "home-manager_2", + "home-manager": "home-manager", "hyprland": "hyprland", "jawz-scripts": "jawz-scripts", "nix-gaming": "nix-gaming", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "nixpkgs-small": "nixpkgs-small", "nixpkgs-unstable": "nixpkgs-unstable", "nixtendo-switch": "nixtendo-switch", @@ -1081,23 +939,6 @@ "ucodenix": "ucodenix" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1748424207, - "narHash": "sha256-Ji0QYOigZOi/w2f3BigbGQIAkaELsvCQbgPGi8pkVFE=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "ed608f592e0a038db4d03ed4af58fd171bd3b3c0", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "sops-nix": { "inputs": { "nixpkgs": [ @@ -1129,7 +970,7 @@ "flake-parts": "flake-parts_4", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_3", + "home-manager": "home-manager_2", "nixpkgs": [ "nixpkgs" ], diff --git a/modules/apps/art.nix b/modules/apps/art.nix index fb81c28..c304948 100644 --- a/modules/apps/art.nix +++ b/modules/apps/art.nix @@ -4,6 +4,16 @@ pkgs, ... }: +let + # Patch to libpng so that big brushes can be loaded + patched-krita = pkgs.replaceDependency { + drv = pkgs.krita; + oldDependency = pkgs.libpng; + newDependency = pkgs.libpng.overrideAttrs (old: { + patches = (old.patches or [ ]) ++ [ ../../patches/libpng.patch ]; + }); + }; +in { options.my = { apps.art.enable = lib.mkEnableOption "enable"; @@ -12,11 +22,11 @@ config = lib.mkIf config.my.apps.art.enable { users.users.jawz.packages = builtins.attrValues { + inherit patched-krita; # art to your heart desire! inherit (pkgs) eyedropper # color picker emulsion-palette # self explanatory gimp # the coolest bestest art program to never exist - krita # art to your heart desire! mypaint # not the best art program mypaint-brushes # but it's got some mypaint-brushes1 # nice damn brushes diff --git a/patches/libpng.patch b/patches/libpng.patch new file mode 100644 index 0000000..cb7724f --- /dev/null +++ b/patches/libpng.patch @@ -0,0 +1,15 @@ +diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa +index fe8e481..ecaffe7 100644 +--- a/scripts/pnglibconf.dfa ++++ b/scripts/pnglibconf.dfa +@@ -516,8 +516,8 @@ setting USER_WIDTH_MAX default 1000000 + setting USER_HEIGHT_MAX default 1000000 + + # Use 0 for unlimited +-setting USER_CHUNK_CACHE_MAX default 1000 +-setting USER_CHUNK_MALLOC_MAX default 8000000 ++setting USER_CHUNK_CACHE_MAX default 0 ++setting USER_CHUNK_MALLOC_MAX default 0 + + # If this option is enabled APIs to set the above limits at run time are added; + # without this the hardwired (compile time) limits will be used.