push
This commit is contained in:
1 parent
ef19a50302
commit
74076952e2
10 files changed
+39
-3
No files matched your search
@@ -0,0 +1,32 @@
|
||||
{
|
||||
den.aspects.software.cad = {
|
||||
homeManager = { pkgs, ... }: {
|
||||
home.packages = let
|
||||
blenderScripts = pkgs.runCommand "blender-user-scripts" { } ''
|
||||
mkdir -p $out/addons
|
||||
cp -r ${./addons}/. $out/addons/
|
||||
'';
|
||||
|
||||
quadRemesherLauncher = pkgs.writeShellScript "quadremesher-launcher" ''
|
||||
engineDir="$(dirname "$1")"
|
||||
export NIX_LD_LIBRARY_PATH="$engineDir:/run/current-system/sw/share/nix-ld/lib''${NIX_LD_LIBRARY_PATH:+:$NIX_LD_LIBRARY_PATH}"
|
||||
export LD_PRELOAD="${pkgs.zlib}/lib/libz.so.1''${LD_PRELOAD:+:$LD_PRELOAD}"
|
||||
exec "$@"
|
||||
'';
|
||||
|
||||
blender-quadremesher = pkgs.symlinkJoin {
|
||||
name = "blender-quadremesher";
|
||||
paths = [ pkgs.blender ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/blender \
|
||||
--set BLENDER_USER_SCRIPTS ${blenderScripts} \
|
||||
--set QUADREMESHER_LAUNCHER ${quadRemesherLauncher}
|
||||
'';
|
||||
};
|
||||
in [
|
||||
blender-quadremesher
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user