stupiv

joined 1 month ago
[–] stupiv@lemmy.ml 1 points 19 hours ago

pkgs.symlinkJoin might help:

{pkgs, ...}: let
  plugin1 = pkgs.fetchFromGitHub { ... };
  plugin2 = pkgs.fetchFromGitHub { ... };
in {
  xdg.dataFile = {
    "krita/pykrita" = {
      enable = true;
      source = pkgs.symlinkJoin {
        name = "pykrita";
        paths = [
          plugin1
          plugin2
        ];
      };
      recursive = true;
    };
  };
}

You might also want to define plugins in separate files:

# krita-plugins.nix
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; {
  options.yourOptions.krita.plugins = mkOption {
    type = types.listOf types.path;
    default = [];
  };
  config = {
    xdg.dataFile = {
      "krita/pykrita" = {
        enable = true;
        source = pkgs.symlinkJoin {
          name = "pykrita";
          paths = config.yourOptions.krita.plugins;
        };
        recursive = true;
      };
    };
  };
}
# kirta-plugin-a.nix
{pkgs, ...}: {
  yourOptions.krita.plugins = [
    (pkgs.fetchFromGitHub { ... })
  ];
}
# kirta-plugin-b.nix
{pkgs, ...}: {
  yourOptions.krita.plugins = [
    (pkgs.fetchFromGitHub { ... })
  ];
}
[–] stupiv@lemmy.ml 2 points 3 days ago (1 children)

Do you know about pkg-config --cflags?

    devShells.${system}.default = pkgs.mkShell {
      buildInputs = with pkgs; [
        pkg-config
        clang
        wlroots_0_19
      ];
    };

pkg-config --cflags wlroots-0.19 outputs -I/nix/store/pkg-hash-wlroots-0.19.0/include/wlroots-0.19

clang your-file.c $(pkg-config --cflags wlroots-0.19) should resolve #include <wlr/backend.h>

[–] stupiv@lemmy.ml 1 points 1 week ago (1 children)

May I ask what your full nixos-rebuild command is?

[–] stupiv@lemmy.ml 3 points 2 weeks ago* (last edited 2 weeks ago)
  programs.fish.enable = true; # Enable your shell
  home.sessionPath = ["$HOME/.local/bin"];

I found the option by searching for "PATH" at home-manager-options.extranix.com.

home.sessionPath will generate hm-session-vars files for different shells. You can read it by cat ~/.nix-profile/etc/profile.d/hm-session-vars.sh.

Enabling the shell is required for the respective hm-session-vars file to be sourced into the shell.