add rider
This commit is contained in:
parent
83f48e4d9c
commit
543aefd93d
|
@ -13,6 +13,7 @@
|
|||
++ [(import ./aseprite)]
|
||||
++ [(import ./audacious)]
|
||||
++ [(import ./unity)]
|
||||
++ [(import ./rider)]
|
||||
# ++ [(import ./discord)]
|
||||
++ [(import ./swaylock)]
|
||||
++ [(import ./wofi)]
|
||||
|
|
59
modules/home/rider/default.nix
Normal file
59
modules/home/rider/default.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ pkgs, lib, inputs, ... }: with lib;
|
||||
let
|
||||
|
||||
extra-path = with pkgs; [
|
||||
dotnetCorePackages.sdk_6_0
|
||||
dotnetPackages.Nuget
|
||||
mono
|
||||
msbuild
|
||||
];
|
||||
|
||||
extra-lib = with pkgs;[
|
||||
# Personal development stuff
|
||||
xorg.libX11
|
||||
|
||||
# Rider Unity debugging
|
||||
xorg.libXcursor
|
||||
xorg.libXrandr
|
||||
libglvnd
|
||||
];
|
||||
|
||||
_rider = pkgs.jetbrains.rider.overrideAttrs (attrs: {
|
||||
postInstall = ''
|
||||
# Wrap rider with extra tools and libraries
|
||||
mv $out/bin/rider $out/bin/.rider-toolless
|
||||
makeWrapper $out/bin/.rider-toolless $out/bin/rider \
|
||||
--argv0 rider \
|
||||
--prefix PATH : "${lib.makeBinPath extra-path}" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath extra-lib}"
|
||||
|
||||
# Making Unity Rider plugin work!
|
||||
# The plugin expects the binary to be at /rider/bin/rider, with bundled files at /rider/
|
||||
# It does this by going up one directory from the directory the binary is in
|
||||
# We have rider binary at $out/bin/rider, so we need to link /rider/ to $out/
|
||||
shopt -s extglob
|
||||
ln -s $out/rider/!(bin) $out/
|
||||
shopt -u extglob
|
||||
'' + attrs.postInstall or "";
|
||||
});
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
_rider
|
||||
];
|
||||
|
||||
# Unity Rider plugin looks here for a .desktop file,
|
||||
# which it uses to find the path to the rider binary.
|
||||
home.file = { ".local/share/applications/jetbrains-rider.desktop".source =
|
||||
let desktopFile = pkgs.makeDesktopItem {
|
||||
name = "jetbrains-rider";
|
||||
desktopName = "Rider";
|
||||
exec = "\"${rider}/bin/rider\"";
|
||||
icon = "rider";
|
||||
type = "Application";
|
||||
# Don't show desktop icon in search or run launcher
|
||||
extraConfig.NoDisplay = "true";
|
||||
};
|
||||
in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue