Fix: Add explicit GI_TYPELIB_PATH for AstalNotifd typelib resolution
This commit is contained in:
+41
-4
@@ -11,7 +11,9 @@
|
||||
glib,
|
||||
gjs,
|
||||
libadwaita,
|
||||
pywal16,
|
||||
dart-sass,
|
||||
psmisc,
|
||||
socat,
|
||||
}:
|
||||
let
|
||||
@@ -26,6 +28,8 @@ let
|
||||
lib.fileset.unions [
|
||||
../flake.nix
|
||||
../flake.lock
|
||||
../result
|
||||
../build
|
||||
./.
|
||||
]
|
||||
);
|
||||
@@ -68,10 +72,21 @@ let
|
||||
|
||||
inherit src;
|
||||
|
||||
# Replace reference to ags FHS install path
|
||||
postPatch = ''
|
||||
substituteInPlace package.json pnpm-lock.yaml \
|
||||
--replace-fail "/usr/share/ags/js" "${inputs'.ags.packages.ags.jsPackage}"
|
||||
# Copy the ags JS lib from the Nix store into the source tree so pnpm can
|
||||
# treat it as a local file: dependency (no /nix/store path inside pnpm).
|
||||
cp -R ${inputs'.ags.packages.ags.jsPackage} ags-js-lib
|
||||
|
||||
# Point the devDependency at the local copy instead of the FHS path.
|
||||
substituteInPlace package.json \
|
||||
--replace-fail "file:/usr/share/ags/js" "file:./ags-js-lib"
|
||||
|
||||
# Update the lockfile to reference the local copy as well.
|
||||
# We need to keep specifiers in sync with package.json to satisfy
|
||||
# pnpm's frozen-lockfile check.
|
||||
substituteInPlace pnpm-lock.yaml \
|
||||
--replace-fail "file:/usr/share/ags/js" "file:./ags-js-lib" \
|
||||
--replace-fail "../../../../usr/share/ags/js" "./ags-js-lib"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
@@ -97,6 +112,7 @@ buildNpmPackage (finalAttrs: {
|
||||
;
|
||||
|
||||
fetcherVersion = 2;
|
||||
# Hash updated after local pnpmDeps build
|
||||
hash = "sha256-m/aPNvv26r0DUvRUR4TL2GwwAHKvEIkc8Nvlm/jpnPc=";
|
||||
|
||||
# fetcher version 2 fails if there are no *-exec files in the output
|
||||
@@ -133,7 +149,8 @@ buildNpmPackage (finalAttrs: {
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
mkdir build
|
||||
# Allow incremental or repeated builds: don't fail if ./build already exists
|
||||
mkdir -p build
|
||||
outPath=./build/${packageJSON.name}
|
||||
ags bundle ./src/app.ts $outPath \
|
||||
--gtk 4 \
|
||||
@@ -166,11 +183,29 @@ buildNpmPackage (finalAttrs: {
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
# runtime executables
|
||||
pywal16 # provides `wal` for colorshell's wallpaper module
|
||||
dart-sass
|
||||
glib
|
||||
psmisc
|
||||
socat
|
||||
]
|
||||
}
|
||||
--prefix GI_TYPELIB_PATH : "${
|
||||
lib.makeSearchPath "lib/girepository-1.0" (with inputs'.astal.packages; [
|
||||
astal4
|
||||
apps
|
||||
auth
|
||||
battery
|
||||
bluetooth
|
||||
hyprland
|
||||
io
|
||||
mpris
|
||||
network
|
||||
notifd
|
||||
tray
|
||||
wireplumber
|
||||
])
|
||||
}"
|
||||
)
|
||||
'';
|
||||
|
||||
@@ -178,3 +213,5 @@ buildNpmPackage (finalAttrs: {
|
||||
resources = colorshellResources;
|
||||
};
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user