Skip to content

Decouple marble-kit from PNPM dependencies list to simplify flake.nix. - #5

Draft
Ezjfc wants to merge 5 commits into
Aylur:mainfrom
Ezjfc:improve-flake
Draft

Decouple marble-kit from PNPM dependencies list to simplify flake.nix.#5
Ezjfc wants to merge 5 commits into
Aylur:mainfrom
Ezjfc:improve-flake

Conversation

@Ezjfc

@Ezjfc Ezjfc commented Jun 15, 2026

Copy link
Copy Markdown

Background

Previously, the sponsor-only dependency marble-kit must be fetched with an extended PNPM fetcher:

marble-shell/flake.nix

Lines 47 to 53 in 216a40a

sshKey = inputs.sshKey;
prePnpmInstall = ''
export PATH="$PATH:${pkgs.git}/bin":${pkgs.openssh}/bin
eval "$(ssh-agent -s)"
ssh-add $sshKey
export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no"
'';

Not only is this cumbersome, defeating the point of the identical inputs.marble, but it also requires adding the SSH key to/nix/store, which is substantially insecure, as stated in README.md of agenix.

This pull request makes a copy of the dependencies list (nix/package.json and nix/pnpm-lock.yaml) and sets marble to point to /nix/kit, which is populated with inputs.marble during build time.

Extra

The PNPM fetcher (version 2) is also outdated and has been removed from 26.11. Attempts to change the fetcher version were tested to be unsuccessful, such as

marble.overrideAttrs (prev: {
  pnpmDeps = prev.pnpmDeps.overrideAttrs {
    fetcherVersion = 3;
  }
})

which will always result in

error: fetchPnpmDeps: `fetcherVersion = 2` was removed in the 26.11 release. Please migrate `marble` to `fetcherVersion = 3` and regenerate the hash. See https://nixos.org/manual/nixpkgs/stable/#javascript-pnpm-fetcherVersion.

Therefore, this pull request also updates inputs.nixpkgs alongside the code of the fetcher.

Moreover, pkgs.pnpm.configHook is deprecated in favour of pkgs.pnpmConfigHook:

evaluation warning: pnpm.configHook: The package attribute is deprecated. Use the top-level pnpmConfigHook attribute instead

Lastly, inputs.sshKey is removed as it is no longer used by the flake.

@Ezjfc Ezjfc changed the title improve flake Reducing the complexity of flake.nix by decoupling marble-kit from the dependencies list. Jun 15, 2026
@Ezjfc Ezjfc changed the title Reducing the complexity of flake.nix by decoupling marble-kit from the dependencies list. Decoupling marble-kit from dependencies list to simplify flake.nix. Jun 15, 2026
@Ezjfc Ezjfc changed the title Decoupling marble-kit from dependencies list to simplify flake.nix. Decouple marble-kit from dependencies list to simplify flake.nix. Jun 15, 2026
@Ezjfc Ezjfc changed the title Decouple marble-kit from dependencies list to simplify flake.nix. Decouple marble-kit from PNPM dependencies list to simplify flake.nix. Jun 15, 2026
@Ezjfc

Ezjfc commented Jun 15, 2026

Copy link
Copy Markdown
Author

Note that this section will become obsolete but I am unsure of the appropriate changes for it:

marble-shell/README.md

Lines 106 to 124 in 216a40a

2. Override the package and include your ssh key.
```nix
inputs: let
{ pkgs, inputs, ... }: let
marble = inputs.marble-shell.packages.${pkgs.system}.default;
marble-shell = marble.overrideAttrs (prev: {
pnpmDeps = prev.pnpmDeps.overrideAttrs {
sshKey = ./path/to/sshkey;
};
});
in {
# using home-manager
home.packages = [marble-shell];
# using configuration.nix
environment.systemPackages = [marble-shell];
}
```

@Ezjfc

Ezjfc commented Jun 15, 2026

Copy link
Copy Markdown
Author

Unfortunately, updating nixpkgs to the latest results in this error:


(gjs:48988): Gjs-CRITICAL **: 02:23:00.211: JS ERROR: Error: Requiring GlyGtk4, version none: Typelib file for namespace 'GlyGtk4' (any version) not found
require@resource:///org/gnome/gjs/modules/esm/gi.js:16:28
@gi://GlyGtk4:3:25

(gjs:48988): Gjs-CRITICAL **: 02:23:00.211: Module file:///run/user/1000/ags.js threw an exception
error: exit status 1

Currently, I have no clue what went wrong.

@Ezjfc

Ezjfc commented Jun 17, 2026

Copy link
Copy Markdown
Author

This fix in the Marble Kit should resovle the above error: https://github.com/marble-shell/kit/issues/6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant