From ccd437a275e2faf5a0921e83b0a0e06a7dc98ad4 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 2 Jan 2025 01:26:38 -0500 Subject: [PATCH] feat(ags): improve types --- lib/pkgs/default.nix | 12 +++++++---- lib/pkgs/mk-types/default.nix | 6 +++++- modules/ags/config/default.nix | 2 +- modules/ags/config/env.d.ts | 16 ++++++-------- modules/ags/config/package-lock.json | Bin 73416 -> 72637 bytes modules/ags/config/package.json | 1 - modules/ags/gtk4/env.d.ts | 30 +++++++++++++++----------- modules/ags/gtk4/package-lock.json | Bin 73416 -> 27 bytes modules/ags/gtk4/package.json | 16 +------------- modules/ags/packages.nix | 31 ++++++++++++++++++--------- 10 files changed, 60 insertions(+), 54 deletions(-) mode change 100644 => 120000 modules/ags/gtk4/package-lock.json mode change 100644 => 120000 modules/ags/gtk4/package.json diff --git a/lib/pkgs/default.nix b/lib/pkgs/default.nix index 02b9d06d..d991c3fa 100644 --- a/lib/pkgs/default.nix +++ b/lib/pkgs/default.nix @@ -31,6 +31,7 @@ in { configPath, packages, pname, + delete ? [], }: let withGirNames = map (package: { @@ -48,15 +49,18 @@ in { then "AstalPowerProfiles-0.1" else if package.pname == "gtk4" then "Gtk-4.0" + else if package.pname == "libadwaita" + then "Adw-1" else (concatMapStrings capitalise (splitString "-" package.pname)) + "-0.1"; }) packages; in { - "${configPath}${optionalString (length packages == 1) "/${toLower (elemAt withGirNames 0).girName}"}".source = - pkgs.callPackage - ./mk-types { + "${configPath}${optionalString (length packages == 1) "/${toLower (elemAt withGirNames 0).girName}"}" = { + force = true; + source = pkgs.callPackage ./mk-types { inherit (self.inputs) ts-for-gir-src; - inherit pname withGirNames; + inherit delete pname withGirNames; }; + }; }; } diff --git a/lib/pkgs/mk-types/default.nix b/lib/pkgs/mk-types/default.nix index 2797c2d9..47a0913d 100644 --- a/lib/pkgs/mk-types/default.nix +++ b/lib/pkgs/mk-types/default.nix @@ -4,9 +4,10 @@ withGirNames, buildNpmPackage, ts-for-gir-src, + delete ? [], ... }: let - inherit (lib) concatMapStringsSep; + inherit (lib) concatMapStringsSep optionalString; buildPhase = '' npx @ts-for-gir/cli generate ${concatMapStringsSep " " (p: p.girName) withGirNames} \ @@ -31,6 +32,9 @@ in ''; installPhase = '' + ${optionalString (delete != []) ( + "rm -f " + concatMapStringsSep " " (file: "./types/${file}.d.ts") delete + )} cp -r ./types $out ''; } diff --git a/modules/ags/config/default.nix b/modules/ags/config/default.nix index f05eabea..21a9ca87 100644 --- a/modules/ags/config/default.nix +++ b/modules/ags/config/default.nix @@ -1,3 +1,3 @@ { - npmDepsHash = "sha256-FzWSWDEqsJxhYOhfSvmZU+/hqw44wm60nM7l32ut1+Y="; + npmDepsHash = "sha256-qn1+dIo7p1+PYlR2qAmnCrR8xE93mYbwNCjDYISgnqU="; } diff --git a/modules/ags/config/env.d.ts b/modules/ags/config/env.d.ts index 2c93f116..9cdf81ce 100644 --- a/modules/ags/config/env.d.ts +++ b/modules/ags/config/env.d.ts @@ -1,6 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ - -const SRC: string; +declare const SRC: string; declare module 'inline:*' { const content: string; @@ -8,18 +6,18 @@ declare module 'inline:*' { export default content; } -declare module '*.sass' { - const content: string; - - export default content; -} - declare module '*.scss' { const content: string; export default content; } +declare module '*.blp' { + const content: string; + + export default content; +} + declare module '*.css' { const content: string; diff --git a/modules/ags/config/package-lock.json b/modules/ags/config/package-lock.json index 2670ba31b6b01a0c483b7aface048c6e91149164..db2e211a9af912d8d2a5631e88a993f4c3d22f32 100644 GIT binary patch delta 150 zcmV;H0BQfoy#&3t1h7Q`li&slvv~oVHnXfb4c7rTlM!P%m-7$-8UZ(x;jJoFX*F~< zHd07VPkb} zS9wk_GE6}^FJ?(%MOSQNNLpiOR7+wxQEy>PW|P5h9+NL68k0~-1h>f%0i6W5uNMIs E2mK{9MF0Q* delta 485 zcmdnHo#n({mJP0q(6*Jgjl*=8&txyg=` z0^G`TO4G`MQi=+)A}R{=azhhSGeb>X z{T;Q=GP}L_+~ZT zke^YC(QNWXcCFBitmI(B+>Er+%1o2+a0}1ylB@vpq#~ChccbJ|m#EV0%A&}k;Kb7W z2zS5q3WH$ts^ruF1M|d`$ZW65WY;27GbjJh5Wj$`B+tD3{7gUNv^>MY$pI~cBo&aSzwfrUskD+ zL0P$BaF9o;af)SDSgBdMm$pf&v9_;oL1C$RL7}UuM~GQ?aY%4Za;mnrdtk1&X=p^S mMQ&A?g-dXxM^T`Mc0^H{QC3)Tskh(cjT>FIFBV~xVg~@nA*C4r diff --git a/modules/ags/config/package.json b/modules/ags/config/package.json index 3c89ae93..f5950673 100644 --- a/modules/ags/config/package.json +++ b/modules/ags/config/package.json @@ -5,7 +5,6 @@ "dependencies": { "@eslint/js": "9.17.0", "@stylistic/eslint-plugin": "2.12.1", - "@types/node": "22.10.2", "eslint": "9.17.0", "eslint-plugin-jsdoc": "50.6.1", "fzf": "0.5.2", diff --git a/modules/ags/gtk4/env.d.ts b/modules/ags/gtk4/env.d.ts index 467c0a41..9cdf81ce 100644 --- a/modules/ags/gtk4/env.d.ts +++ b/modules/ags/gtk4/env.d.ts @@ -1,21 +1,25 @@ -declare const SRC: string +declare const SRC: string; -declare module "inline:*" { - const content: string - export default content +declare module 'inline:*' { + const content: string; + + export default content; } -declare module "*.scss" { - const content: string - export default content +declare module '*.scss' { + const content: string; + + export default content; } -declare module "*.blp" { - const content: string - export default content +declare module '*.blp' { + const content: string; + + export default content; } -declare module "*.css" { - const content: string - export default content +declare module '*.css' { + const content: string; + + export default content; } diff --git a/modules/ags/gtk4/package-lock.json b/modules/ags/gtk4/package-lock.json deleted file mode 100644 index 2670ba31b6b01a0c483b7aface048c6e91149164..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73416 zcmeIbX}6+UmMHqYe#IH_@%nZM(pux5e5rtGtjX7f1UsL?ared z{}ueZss);-YMx@1z?|>+yB0Z?7uPrW!+mRhhl%qGz2B4n{r2}L&KxU>Ev0_^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&BM*5GuTLHA|=G_Y*CV6bG zeMn2s2o*ojJiz{rrhtvQ|+PcgED)B!LCs0JB1R2Pqy{Pv*EcB9vRG?m_j$Z&_FYBp3TzMRxtuGnI5x9Q1C(HG z7G2+wn%QF0F%Hz+cB1uUxWq8OrY?z|xI?CtNFN>tTp-Z={~-_WZ&^Ng>U~xZNyMQJM?umU{qg2WyPP$VscQ+wI|b zi0yld1zNelI33RG(4fxLnIljV;jy+=oyhL!Nlntw0nr@!+HbI+K8k<}v3D#kI#cdX zh`kpJZ}R;zO*Ao!Kif=3Y-MOwHk7Czl}y8ac^ajQ4G16c>Y7%L-+?pgau8LeDsPd|++HkK19Z?*gm}D})aQaVwegJ- zCA2vX_Hz!L;Z9p*tL~7(tZmm~xEuFd@HC4evEhWRiJ{)uERdQvlhPm+w^6sf zTH5w@7<;m4ghRTPZHUlZLUzK?`$Jz^iQNse#C$^v2KktmriUQ4TPl7ro1>mtEcW$s@P7U!7TUhLDrU zdk=Y0b5?m~Nt5K9zk_7Cq+HX1|#hziv zY(g_gu(TKcGGN7pjI_g*!tkh&N*LD0l*eRpBQ97G2`^RwUN>UjN5!#0yCg*_x{Mbv z05UGFfYS)%N>#lRF6?L*c|4`|>%Q4l@VzlkGoI8;joL>RHzeJC!qnrsJ6de}S~^Zf zuxoLFz)q~GAq*%^+jHnpYjqZq5k~~;^6SQL3#9yvxl}TOUOuX&;KTp;xBvLJ{|}VG B@!|jg diff --git a/modules/ags/gtk4/package-lock.json b/modules/ags/gtk4/package-lock.json new file mode 120000 index 00000000..a908665d --- /dev/null +++ b/modules/ags/gtk4/package-lock.json @@ -0,0 +1 @@ +../config/package-lock.json \ No newline at end of file diff --git a/modules/ags/gtk4/package.json b/modules/ags/gtk4/package.json deleted file mode 100644 index 3c89ae93..00000000 --- a/modules/ags/gtk4/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "ags", - "version": "0.0.0", - "main": "app.ts", - "dependencies": { - "@eslint/js": "9.17.0", - "@stylistic/eslint-plugin": "2.12.1", - "@types/node": "22.10.2", - "eslint": "9.17.0", - "eslint-plugin-jsdoc": "50.6.1", - "fzf": "0.5.2", - "jiti": "2.4.2", - "typescript-eslint": "8.19.0" - } -} diff --git a/modules/ags/gtk4/package.json b/modules/ags/gtk4/package.json new file mode 120000 index 00000000..f3ea5f3b --- /dev/null +++ b/modules/ags/gtk4/package.json @@ -0,0 +1 @@ +../config/package.json \ No newline at end of file diff --git a/modules/ags/packages.nix b/modules/ags/packages.nix index 7e8fb9a5..b91672f2 100644 --- a/modules/ags/packages.nix +++ b/modules/ags/packages.nix @@ -5,11 +5,11 @@ self: { pkgs, ... }: let - inherit (self.inputs) ags gtk-session-lock; + inherit (self.inputs) ags astal gtk-session-lock; gtkSessionLock = gtk-session-lock.packages.${pkgs.system}.default; - inherit (lib) attrValues boolToString getExe optionalAttrs optionals; + inherit (lib) attrValues boolToString filter getExe optionalAttrs optionals; inherit (osConfig.networking) hostName; @@ -37,7 +37,7 @@ in { }; astalLibs = attrValues { inherit - (ags.inputs.astal.packages.${pkgs.system}) + (astal.packages.${pkgs.system}) io astal3 astal4 @@ -59,6 +59,7 @@ in { inherit (pkgs) + libadwaita gtk4 # Needed to build types ; }; @@ -118,7 +119,7 @@ in { ; mkTsConf = gtkVer: let - inherit (ags.packages.${pkgs.system}) gjs; + inherit (astal.packages.${pkgs.system}) gjs; in pkgs.writers.writeJSON "tsconfig.json" { "$schema" = "https://json.schemastore.org/tsconfig"; @@ -127,6 +128,7 @@ in { "strict" = true; "target" = "ES2022"; "module" = "ES2022"; + "lib" = ["ES2022"]; "moduleResolution" = "Bundler"; "noEmit" = true; "jsx" = "react-jsx"; @@ -141,19 +143,28 @@ in { (buildGirTypes { pname = "ags"; configPath = "${cfg.configDir}/@girs"; - packages = cfg.astalLibs; + packages = filter (x: + x.pname != "astal4" && x.pname != "libadwaita") + cfg.astalLibs; + delete = ["gdk-4.0" "gtk-4.0" "gsk-4.0"]; }) // (buildGirTypes { pname = "ags"; configPath = "${gtk4ConfigDir}/@girs"; - packages = cfg.astalLibs; + packages = filter (x: + x.pname != "astal3" && x.pname != "gtk-session-lock") + cfg.astalLibs; }) // { - "${cfg.configDir}/node_modules".source = - buildNodeModules ./config (import ./config).npmDepsHash; + "${cfg.configDir}/node_modules" = { + force = true; + source = buildNodeModules ./config (import ./config).npmDepsHash; + }; - "${gtk4ConfigDir}/node_modules".source = - buildNodeModules ./config (import ./config).npmDepsHash; + "${gtk4ConfigDir}/node_modules" = { + force = true; + source = buildNodeModules ./config (import ./config).npmDepsHash; + }; "${cfg.configDir}/tsconfig.json".source = mkTsConf 3;