From 8f0ec20dcfe30c5eff1a62e3d2655a160fc5e4a0 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 17 Jul 2024 00:21:12 -0400 Subject: [PATCH] fix(ags): use package flag on ts-for-gir --- flake.lock | 36 +++--- flake.nix | 12 +- inputs.nix | 4 + modules/ags/config/package-lock.json | 114 +++++++++--------- modules/ags/config/package.json | 4 +- modules/ags/config/ts/bar/items/systray.ts | 8 +- modules/ags/default.nix | 32 +++-- .../{third-party-types => mk-types}/.envrc | 0 modules/ags/mk-types/default.nix | 29 +++++ .../package-lock.json | 6 +- .../package.json | 0 modules/ags/third-party-types/lock.nix | 38 ------ modules/ags/third-party-types/npmDepsHash.nix | 1 - modules/ags/third-party-types/tray.nix | 43 ------- 14 files changed, 142 insertions(+), 185 deletions(-) rename modules/ags/{third-party-types => mk-types}/.envrc (100%) create mode 100644 modules/ags/mk-types/default.nix rename modules/ags/{third-party-types => mk-types}/package-lock.json (99%) rename modules/ags/{third-party-types => mk-types}/package.json (100%) delete mode 100644 modules/ags/third-party-types/lock.nix delete mode 100644 modules/ags/third-party-types/npmDepsHash.nix delete mode 100644 modules/ags/third-party-types/tray.nix diff --git a/flake.lock b/flake.lock index 5047ea98..0b49e20c 100644 --- a/flake.lock +++ b/flake.lock @@ -191,22 +191,6 @@ "type": "github" } }, - "curseforge-server-downloader-src_2": { - "flake": false, - "locked": { - "lastModified": 1691252534, - "narHash": "sha256-GqFj2Rms6BxzWdQTQ9imXKSlov3sDk8Cwwl9lwjIGzM=", - "owner": "Malpiszonekx4", - "repo": "curseforge-server-downloader", - "rev": "91901b2efc64ac54c9135d537e4118e2ac0bd286", - "type": "github" - }, - "original": { - "owner": "Malpiszonekx4", - "repo": "curseforge-server-downloader", - "type": "github" - } - }, "discord-overlay": { "inputs": { "Vencord-src": "Vencord-src", @@ -1197,7 +1181,7 @@ }, "minix": { "inputs": { - "curseforge-server-downloader-src": "curseforge-server-downloader-src_2", + "curseforge-server-downloader-src": "curseforge-server-downloader-src", "nixpkgs": [ "nixpkgs" ] @@ -2017,7 +2001,6 @@ "bat-theme-src": "bat-theme-src", "bazarr-bulk": "bazarr-bulk", "caddy-plugins": "caddy-plugins", - "curseforge-server-downloader-src": "curseforge-server-downloader-src", "discord-overlay": "discord-overlay", "dracula-plymouth-src": "dracula-plymouth-src", "eisa-scripts-src": "eisa-scripts-src", @@ -2065,6 +2048,7 @@ "sops-nix": "sops-nix_2", "subsync": "subsync", "trash-d-src": "trash-d-src", + "ts-for-gir-src": "ts-for-gir-src", "vimplugin-easytables-src": "vimplugin-easytables-src", "vimplugin-ts-error-translator-src": "vimplugin-ts-error-translator-src" } @@ -2375,6 +2359,22 @@ "type": "github" } }, + "ts-for-gir-src": { + "flake": false, + "locked": { + "lastModified": 1721021811, + "narHash": "sha256-QU6sEa3HR40DrAYvciYYbWgCneVdZvLpphcqeegOotM=", + "owner": "gjsify", + "repo": "ts-for-gir", + "rev": "80cacc3050f93baf6b49ce3f14336151c252567e", + "type": "github" + }, + "original": { + "owner": "gjsify", + "repo": "ts-for-gir", + "type": "github" + } + }, "vimplugin-easytables-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index d19d60f3..2e70bde8 100644 --- a/flake.nix +++ b/flake.nix @@ -49,12 +49,6 @@ repo = "nixos-caddy-cloudflare"; type = "github"; }; - curseforge-server-downloader-src = { - flake = false; - owner = "Malpiszonekx4"; - repo = "curseforge-server-downloader"; - type = "github"; - }; discord-overlay = { inputs.nixpkgs.follows = "nixpkgs"; owner = "matt1432"; @@ -332,6 +326,12 @@ repo = "trash-d"; type = "github"; }; + ts-for-gir-src = { + flake = false; + owner = "gjsify"; + repo = "ts-for-gir"; + type = "github"; + }; vimplugin-easytables-src = { flake = false; owner = "Myzel394"; diff --git a/inputs.nix b/inputs.nix index 13acf28f..ffc4fbdf 100644 --- a/inputs.nix +++ b/inputs.nix @@ -221,6 +221,10 @@ let owner = "libratbag"; repo = "piper"; } + { + owner = "gjsify"; + repo = "ts-for-gir"; + } # MPV scripts { diff --git a/modules/ags/config/package-lock.json b/modules/ags/config/package-lock.json index cb3c86cd..ade0ce50 100644 --- a/modules/ags/config/package-lock.json +++ b/modules/ags/config/package-lock.json @@ -5,17 +5,17 @@ "packages": { "": { "dependencies": { - "fzf": "^0.5.2" + "fzf": "0.5.2" }, "devDependencies": { "@eslint/js": "9.7.0", "@stylistic/eslint-plugin": "2.3.0", "@types/eslint__js": "8.42.3", - "@types/node": "20.14.10", + "@types/node": "20.14.11", "eslint": "9.7.0", "eslint-plugin-jsdoc": "48.7.0", "typescript": "5.5.3", - "typescript-eslint": "7.16.0" + "typescript-eslint": "7.16.1" } }, "node_modules/@es-joy/jsdoccomment": { @@ -384,9 +384,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.14.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", - "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", + "version": "20.14.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", + "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", "dev": true, "license": "MIT", "dependencies": { @@ -394,17 +394,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.0.tgz", - "integrity": "sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.1.tgz", + "integrity": "sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.16.0", - "@typescript-eslint/type-utils": "7.16.0", - "@typescript-eslint/utils": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0", + "@typescript-eslint/scope-manager": "7.16.1", + "@typescript-eslint/type-utils": "7.16.1", + "@typescript-eslint/utils": "7.16.1", + "@typescript-eslint/visitor-keys": "7.16.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -428,16 +428,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.0.tgz", - "integrity": "sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.1.tgz", + "integrity": "sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.16.0", - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/typescript-estree": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0", + "@typescript-eslint/scope-manager": "7.16.1", + "@typescript-eslint/types": "7.16.1", + "@typescript-eslint/typescript-estree": "7.16.1", + "@typescript-eslint/visitor-keys": "7.16.1", "debug": "^4.3.4" }, "engines": { @@ -457,14 +457,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.0.tgz", - "integrity": "sha512-8gVv3kW6n01Q6TrI1cmTZ9YMFi3ucDT7i7aI5lEikk2ebk1AEjrwX8MDTdaX5D7fPXMBLvnsaa0IFTAu+jcfOw==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.1.tgz", + "integrity": "sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0" + "@typescript-eslint/types": "7.16.1", + "@typescript-eslint/visitor-keys": "7.16.1" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -475,14 +475,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.0.tgz", - "integrity": "sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.1.tgz", + "integrity": "sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.16.0", - "@typescript-eslint/utils": "7.16.0", + "@typescript-eslint/typescript-estree": "7.16.1", + "@typescript-eslint/utils": "7.16.1", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -503,9 +503,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.0.tgz", - "integrity": "sha512-fecuH15Y+TzlUutvUl9Cc2XJxqdLr7+93SQIbcZfd4XRGGKoxyljK27b+kxKamjRkU7FYC6RrbSCg0ALcZn/xw==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.1.tgz", + "integrity": "sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ==", "dev": true, "license": "MIT", "engines": { @@ -517,14 +517,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.0.tgz", - "integrity": "sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.1.tgz", + "integrity": "sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0", + "@typescript-eslint/types": "7.16.1", + "@typescript-eslint/visitor-keys": "7.16.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -546,16 +546,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.0.tgz", - "integrity": "sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.1.tgz", + "integrity": "sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.16.0", - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/typescript-estree": "7.16.0" + "@typescript-eslint/scope-manager": "7.16.1", + "@typescript-eslint/types": "7.16.1", + "@typescript-eslint/typescript-estree": "7.16.1" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -569,13 +569,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.0.tgz", - "integrity": "sha512-rMo01uPy9C7XxG7AFsxa8zLnWXTF8N3PYclekWSrurvhwiw1eW88mrKiAYe6s53AUY57nTRz8dJsuuXdkAhzCg==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.1.tgz", + "integrity": "sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.16.0", + "@typescript-eslint/types": "7.16.1", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1701,9 +1701,9 @@ } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "license": "ISC", "bin": { @@ -1902,15 +1902,15 @@ } }, "node_modules/typescript-eslint": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.16.0.tgz", - "integrity": "sha512-kaVRivQjOzuoCXU6+hLnjo3/baxyzWVO5GrnExkFzETRYJKVHYkrJglOu2OCm8Hi9RPDWX1PTNNTpU5KRV0+RA==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.16.1.tgz", + "integrity": "sha512-889oE5qELj65q/tGeOSvlreNKhimitFwZqQ0o7PcWC7/lgRkAMknznsCsV8J8mZGTP/Z+cIbX8accf2DE33hrA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "7.16.0", - "@typescript-eslint/parser": "7.16.0", - "@typescript-eslint/utils": "7.16.0" + "@typescript-eslint/eslint-plugin": "7.16.1", + "@typescript-eslint/parser": "7.16.1", + "@typescript-eslint/utils": "7.16.1" }, "engines": { "node": "^18.18.0 || >=20.0.0" diff --git a/modules/ags/config/package.json b/modules/ags/config/package.json index 6f64f904..1ffeb4c3 100644 --- a/modules/ags/config/package.json +++ b/modules/ags/config/package.json @@ -8,11 +8,11 @@ "@eslint/js": "9.7.0", "@stylistic/eslint-plugin": "2.3.0", "@types/eslint__js": "8.42.3", - "@types/node": "20.14.10", + "@types/node": "20.14.11", "eslint": "9.7.0", "eslint-plugin-jsdoc": "48.7.0", "typescript": "5.5.3", - "typescript-eslint": "7.16.0" + "typescript-eslint": "7.16.1" }, "overrides": { "eslint": "$eslint" diff --git a/modules/ags/config/ts/bar/items/systray.ts b/modules/ags/config/ts/bar/items/systray.ts index c7da6c0a..56ab4a5c 100644 --- a/modules/ags/config/ts/bar/items/systray.ts +++ b/modules/ags/config/ts/bar/items/systray.ts @@ -1,5 +1,5 @@ -import Tray from 'gi://AstalTray?version=0.1'; -const SystemTray = Tray.Tray.get_default(); +import AstalTray from 'gi://AstalTray?version=0.1'; +const SystemTray = AstalTray.Tray.get_default(); const { timeout } = Utils; @@ -10,10 +10,6 @@ import Separator from '../../misc/separator.ts'; const REVEAL_DURATION = 500; const SPACING = 12; -/* Types */ -// FIXME: get types from 'gi://AstalTray' -import type AstalTray from 'types/astal-tray/astaltray-0.1.d.ts'; - const SysTrayItem = (item: AstalTray.TrayItem) => { if (item.id === 'spotify-client') { diff --git a/modules/ags/default.nix b/modules/ags/default.nix index 45b1cc5c..6c4bfcde 100644 --- a/modules/ags/default.nix +++ b/modules/ags/default.nix @@ -6,9 +6,10 @@ lib, pkgs, self, + ts-for-gir-src, ... }: let - inherit (lib) boolToString; + inherit (lib) boolToString toLower; # Configs inherit (config.vars) mainUser hostName; @@ -44,6 +45,7 @@ in { export default (await transpileTypeScript('${hostName}')).default; ''; + agsPkg = config.programs.ags.finalPackage; agsConfigDir = "${removePrefix "/home/${mainUser}/" flakeDir}/modules/ags"; in { assertions = [ @@ -65,20 +67,27 @@ in { }; home = { - file = + file = let + mkType = package: girName: { + "${agsConfigDir}/config/types/@girs/${toLower girName}".source = + pkgs.callPackage + ./mk-types { + inherit ts-for-gir-src package girName; + }; + }; + in ( { - # Out of store symlinks - ".config/ags".source = mkOutOfStoreSymlink "${flakeDir}/modules/ags/config"; - # Generated types "${agsConfigDir}/config/types" = { - source = "${config.programs.ags.finalPackage}/share/com.github.Aylur.ags/types"; + source = "${agsPkg}/share/com.github.Aylur.ags/types"; recursive = true; # To add other types inside the folder }; - "${agsConfigDir}/config/types/gtk-session-lock".source = - pkgs.callPackage ./third-party-types/lock.nix {inherit gtkSessionLock;}; - "${agsConfigDir}/config/types/astal-tray".source = - pkgs.callPackage ./third-party-types/tray.nix {inherit astalTray;}; + } + // (mkType gtkSessionLock "GtkSessionLock-0.1") + // (mkType astalTray "AstalTray-0.1") + // { + # Out of store symlinks + ".config/ags".source = mkOutOfStoreSymlink "${flakeDir}/modules/ags/config"; # Generated JavaScript files "${agsConfigDir}/config/config.js".text = configJs; @@ -92,7 +101,8 @@ in { }; ''; } - // (import ./icons.nix {inherit pkgs agsConfigDir;}); + // (import ./icons.nix {inherit pkgs agsConfigDir;}) + ); packages = [ diff --git a/modules/ags/third-party-types/.envrc b/modules/ags/mk-types/.envrc similarity index 100% rename from modules/ags/third-party-types/.envrc rename to modules/ags/mk-types/.envrc diff --git a/modules/ags/mk-types/default.nix b/modules/ags/mk-types/default.nix new file mode 100644 index 00000000..aefe02dc --- /dev/null +++ b/modules/ags/mk-types/default.nix @@ -0,0 +1,29 @@ +{ + package, + girName, + buildNpmPackage, + ts-for-gir-src, + ... +}: +buildNpmPackage { + pname = "${package.pname}-types"; + inherit (package) version; + + npmDepsHash = "sha256-8De8tRUKzRhD1jyx0anYNPMhxZyIr2nI45HdK6nb8jI="; + + src = ./.; + dontNpmBuild = true; + + buildPhase = '' + npx @ts-for-gir/cli generate ${girName} \ + -g ${package.dev}/share/gir-1.0 \ + -g ${ts-for-gir-src}/girs \ + --ignoreVersionConflicts \ + --package \ + -e gjs -o ./types + ''; + + installPhase = '' + cp -r ./types $out + ''; +} diff --git a/modules/ags/third-party-types/package-lock.json b/modules/ags/mk-types/package-lock.json similarity index 99% rename from modules/ags/third-party-types/package-lock.json rename to modules/ags/mk-types/package-lock.json index 45cfeac9..47c396a2 100644 --- a/modules/ags/third-party-types/package-lock.json +++ b/modules/ags/mk-types/package-lock.json @@ -108,9 +108,9 @@ } }, "node_modules/@inquirer/figures": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.3.tgz", - "integrity": "sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.4.tgz", + "integrity": "sha512-R7Gsg6elpuqdn55fBH2y9oYzrU/yKrSmIsDX4ROT51vohrECFzTf2zw9BfUbOW8xjfmM2QbVoVYdTwhrtEKWSQ==", "license": "MIT", "engines": { "node": ">=18" diff --git a/modules/ags/third-party-types/package.json b/modules/ags/mk-types/package.json similarity index 100% rename from modules/ags/third-party-types/package.json rename to modules/ags/mk-types/package.json diff --git a/modules/ags/third-party-types/lock.nix b/modules/ags/third-party-types/lock.nix deleted file mode 100644 index 6d1d291f..00000000 --- a/modules/ags/third-party-types/lock.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - atk, - buildNpmPackage, - gdk-pixbuf, - gobject-introspection, - gtk3, - gtkSessionLock, - harfbuzz, - pango, - ... -}: -buildNpmPackage { - pname = "gtk-session-lock-types"; - inherit (gtkSessionLock) version; - - npmDepsHash = import ./npmDepsHash.nix; - - src = ./.; - dontNpmBuild = true; - - installPhase = '' - npx @ts-for-gir/cli generate ${builtins.concatStringsSep " " [ - "-g ${gtkSessionLock.dev}/share/gir-1.0" - "-g ${gobject-introspection.dev}/share/gir-1.0" - "-g ${gtk3.dev}/share/gir-1.0" - "-g ${pango.dev}/share/gir-1.0" - "-g ${gdk-pixbuf.dev}/share/gir-1.0" - "-g ${harfbuzz.dev}/share/gir-1.0" - "-g ${atk.dev}/share/gir-1.0" - ]} -e gjs -o ./types - - mkdir -p $out - cp ./types/gtksessionlock* $out/ - - substituteInPlace $out/gtksessionlock* --replace-warn \ - "from '." "from '@girs" - ''; -} diff --git a/modules/ags/third-party-types/npmDepsHash.nix b/modules/ags/third-party-types/npmDepsHash.nix deleted file mode 100644 index 46264f45..00000000 --- a/modules/ags/third-party-types/npmDepsHash.nix +++ /dev/null @@ -1 +0,0 @@ -"sha256-moEiTMb0HC/LOhOaGM6NBi54fisRW5vigsXvFSqURyg=" diff --git a/modules/ags/third-party-types/tray.nix b/modules/ags/third-party-types/tray.nix deleted file mode 100644 index c8fffc75..00000000 --- a/modules/ags/third-party-types/tray.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - astalTray, - atk, - buildNpmPackage, - gdk-pixbuf, - glib, - gobject-introspection, - gtk3, - harfbuzz, - libdbusmenu-gtk3, - pango, - ... -}: -buildNpmPackage { - pname = "astal-tray-types"; - inherit (astalTray) version; - - npmDepsHash = import ./npmDepsHash.nix; - - src = ./.; - dontNpmBuild = true; - - installPhase = '' - npx @ts-for-gir/cli generate ${builtins.concatStringsSep " " [ - "-g ${astalTray.dev}/share/gir-1.0" - "-g ${atk.dev}/share/gir-1.0" - "-g ${gdk-pixbuf.dev}/share/gir-1.0" - "-g ${glib.dev}/share/gir-1.0" - "-g ${gobject-introspection.dev}/share/gir-1.0" - "-g ${gtk3.dev}/share/gir-1.0" - "-g ${harfbuzz.dev}/share/gir-1.0" - "-g ${libdbusmenu-gtk3}/share/gir-1.0" - "-g ${pango.dev}/share/gir-1.0" - "--ignoreVersionConflicts" - ]} -e gjs -o ./types - - mkdir -p $out - cp ./types/astaltray* $out/ - - substituteInPlace $out/astaltray* --replace-warn \ - "from '." "from '@girs" - ''; -}