mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
nixos/programs/blender: update addons build step
The previous one just overwrites existing directories from previous paths if there's any similar directory.
This commit is contained in:
parent
5a0f61da58
commit
5b68cf1f04
@ -7,21 +7,12 @@ let
|
||||
let
|
||||
blenderVersion = lib.versions.majorMinor cfg.package.version;
|
||||
in
|
||||
pkgs.runCommand "blender-system-resources"
|
||||
{
|
||||
passAsFile = [ "paths" ];
|
||||
paths = cfg.addons ++ [ cfg.package ];
|
||||
nativeBuildInputs = with pkgs; [ outils ];
|
||||
} ''
|
||||
mkdir -p $out
|
||||
for i in $(cat $pathsPath); do
|
||||
resourcesPath="$i/share/blender"
|
||||
if [ -d $i/share/blender/${blenderVersion} ]; then
|
||||
resourcesPath="$i/share/blender/${blenderVersion}";
|
||||
fi
|
||||
lndir -silent $resourcesPath $out
|
||||
done
|
||||
'';
|
||||
pkgs.symlinkJoin {
|
||||
name = "blender-${blenderVersion}-addons";
|
||||
paths = let
|
||||
_paths = cfg.addons ++ [ cfg.package ];
|
||||
in lib.concatMap (p: [ "${p}/share/blender" ]) _paths;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.programs.blender = {
|
||||
|
Loading…
Reference in New Issue
Block a user