fix outDir creation

biggest blunder in recorded nte history
This commit is contained in:
jacekpoz 2024-09-12 22:53:38 +02:00
parent dc4a7baf87
commit c5f6eec8e0
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -9,7 +9,7 @@ pkgs: engine: {
}: let }: let
inherit (pkgs) lib; inherit (pkgs) lib;
inherit (lib.lists) forEach init; inherit (lib.lists) forEach init;
inherit (lib.strings) concatStrings match normalizePath optionalString splitString; inherit (lib.strings) concatStrings concatStringsSep match normalizePath optionalString splitString;
in pkgs.stdenv.mkDerivation { in pkgs.stdenv.mkDerivation {
inherit name version src; inherit name version src;
@ -29,7 +29,7 @@ in pkgs.stdenv.mkDerivation {
${concatStrings (forEach extraFiles ${concatStrings (forEach extraFiles
(extraFile: let (extraFile: let
isInSubdir = (match ".+/.*" extraFile.destination) != null; isInSubdir = (match ".+/.*" extraFile.destination) != null;
outDir = concatStrings (init (splitString "/" extraFile.destination)); outDir = normalizePath "$out/${concatStringsSep "/" (init (splitString "/" extraFile.destination))}";
outPath = normalizePath "$out/${extraFile.destination}"; outPath = normalizePath "$out/${extraFile.destination}";
in /*sh*/'' in /*sh*/''
${optionalString isInSubdir /*sh*/"mkdir -p ${outDir}"} ${optionalString isInSubdir /*sh*/"mkdir -p ${outDir}"}