Skip to content

Pure Data externals for Nix and NixOS (that are not in nixpkgs yet)

License

Notifications You must be signed in to change notification settings

enzohideo/puredata-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puredata-nix

Pure Data externals for Nix and NixOS.

Externals

  • ggee
  • iemguts
  • iemlib
  • ofelia
  • windowing

Usage with flakes

Manually pick which externals you want to use

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    puredata.url = "github:enzohideo/puredata-nix";
  };

  outputs = { ... }@inputs: let
    system = "x86_64-linux";
    pkgs = inputs.nixpkgs.legacyPackages.${system};
    extraPkgs = inputs.puredata.packages.${system};
  in {
    devShells.${system}.default = pkgs.mkShell {
      buildInputs = [
        (pkgs.puredata-with-plugins (with pkgs; [
          cyclone
          zexy
        ] ++ (with extraPkgs; [
          ggee
          iemguts
          iemlib
          ofelia
          windowing
        ])))
      ];
    };
  };
}

Or use the example dev shell provided by this flake

{
  inputs.puredata.url = "github:enzohideo/puredata-nix";

  outputs = { ... }@inputs: {
    devShells = inputs.puredata.devShells;
  };
}

Note

In this case you could also just type nix develop github:enzohideo/puredata-nix

Ofelia/abs on Wayland

Ofelia seems to segfault on wayland when using objects from ofelia/abs. As a temporary workaround, you can use gamescope.

{
  inputs.puredata.url = "github:enzohideo/puredata-nix";

  outputs = { ... }@inputs: let
    system = "x86_64-linux";
    pkgs = inputs.puredata.inputs.nixpkgs.legacyPackages.${system};
    ofelia = inputs.puredata.packages.${system}.ofelia;
  in {
    devShells.${system}.default = pkgs.mkShell {
      inputsFrom = [
        inputs.puredata.devShells.${system}.compmus
      ];

      buildInputs = with pkgs; [
        gamescope
      ];

      shellHook = ''
        # you need to specify the path to ofelia/abs
        gamescope -- pd -path "${ofelia}/ofelia/abs"
        exit
      '';
    };
  };
}

You might need to change the pkgs input to avoid version mismatch between gamescope's and your system's mesa.

Note

The default dev shell can be started with nix develop

About

Pure Data externals for Nix and NixOS (that are not in nixpkgs yet)

Topics

Resources

License

Stars

Watchers

Forks

Languages