Skip to content

Commit

Permalink
flake regeneration 2024-10-17
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 17, 2024
1 parent 93b3ee9 commit b616000
Show file tree
Hide file tree
Showing 13 changed files with 2,351 additions and 587 deletions.
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 22 additions & 14 deletions mk-reapack-package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,9 @@ with lib; let

decodeUrl = s: replaceStrings ["%20" "%21" "%22" "%23" "%24" "%25" "%26" "%27" "%28" "%29" "%2A" "%2B" "%2C" "%2D" "%2E" "%2F" "%3A" "%3B" "%3C" "%3D" "%3E" "%3F" "%40" "%5B" "%5C" "%5D" "%5E" "%5F" "%60" "%7B" "%7C" "%7D" "%7E"] [" " "!" "\"" "#" "$" "%" "&" "'" "(" ")" "*" "+" "," "-" "." "/" ":" ";" "<" "=" ">" "?" "@" "[" "\\" "]" "^" "_" "`" "{" "|" "}" "~"] s;

sourcesWithName = map (s: s // {name = strings.sanitizeDerivationName (decodeUrl s.url);}) sources;
getPathFromSource = (s: if s.path == "" then (baseNameOf (decodeUrl s.url)) else s.path);

sourceDataString = escapeSingleQuote (strings.concatMapStrings (s: let
path =
if s.path == ""
then (baseNameOf (decodeUrl s.url))
else s.path;
in "${s.name}|${path}|")
sourcesWithName);
sourcesWithName = map (s: s // {name = strings.sanitizeDerivationName (decodeUrl s.url);}) sources;
in
stdenv.mkDerivation {
name = name;
Expand All @@ -55,23 +49,37 @@ in

srcs = map (elem: fetchurl {inherit (elem) url sha256 name;}) sourcesWithName;

pairs = escapeSingleQuote (strings.concatMapStrings (s: "${s.name}|${(getPathFromSource s)}|") sourcesWithName);

passAsFile = [ "srcs" "pairs" ];

installPhase =
#bash
''
runHook preInstall
dst="$out/${parentDir}"
IFS='|' read -ra lines <<< '${sourceDataString}'
for ((i=0; i<''${#lines[@]}; i+=2)); do
name="''${lines[i]}"
path="''${lines[i+1]}"
readarray -td '|' pairsArray < "$pairsPath"
for ((i=0; i<''${#pairsArray[@]}; i+=2)); do
name="''${pairsArray[i]}"
path="''${pairsArray[i+1]}"
targetName="$(basename "$path")"
targetDir="$dst/$(dirname "$path")"
source=$(for s in $srcs; do echo "$s" | grep -q "$name" && echo "$s" && break; done)
mkdir -p "$targetDir"
if [ -f "$targetDir/$targetName" ]; then
echo "File $targetDir/$targetName already exists. Skipping."
else
mkdir -p "$targetDir"
readarray -td ' ' sourcesArray < $srcsPath
source=""
for src in ''${sourcesArray[@]}; do
if [[ "$src" == *"$name" ]]; then
source="$src"
break
fi
done
cp "$source" "$targetDir/$targetName"
fi
done
Expand Down
34 changes: 34 additions & 0 deletions reapack-packages/acendan-scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7576,6 +7576,40 @@
}
];
};
acendan-the-last-renamer-lua-1-11 = mkReapackPackage {
inherit lib stdenv fetchurl;
name = "acendan-the-last-renamer-lua-1-11";
indexName = "ACendan Scripts";
categoryName = "Various";
packageType = "script";
sources = [
{
path = '''';
url = "https://github.com/acendan/reascripts/raw/b3fdfda61c5770d96da958b542940e6c8cf6caf3/Various/acendan_The%20Last%20Renamer.lua";
sha256 = "1jqn471z26dbhn051afw8hb7r79z7n2x2g7rcygqz5s5y8vh6vsq";
}
{
path = ''Schemes/Example.yaml'';
url = "https://github.com/acendan/reascripts/raw/b3fdfda61c5770d96da958b542940e6c8cf6caf3/Various/Schemes/Example.yaml";
sha256 = "1id37bn93wh7fa47npnxgvh7aa7n4xli8xc0xa3klq9axcmb70i5";
}
{
path = ''Schemes/Generic Game.yaml'';
url = "https://github.com/acendan/reascripts/raw/b3fdfda61c5770d96da958b542940e6c8cf6caf3/Various/Schemes/Generic%20Game.yaml";
sha256 = "11d6lda36ywdw0wi44hqj7afbd39mafgaj0z13k5zkgq53w4sbpc";
}
{
path = ''Schemes/UCS.yaml'';
url = "https://github.com/acendan/reascripts/raw/b3fdfda61c5770d96da958b542940e6c8cf6caf3/Various/Schemes/UCS.yaml";
sha256 = "015l702wld5i4dd50sanf19mayrv466hnpkkqwvpikrw9xajmnd2";
}
{
path = ''Meta/meta.yaml'';
url = "https://github.com/acendan/reascripts/raw/b3fdfda61c5770d96da958b542940e6c8cf6caf3/Various/Meta/meta.yaml";
sha256 = "0nss3rk7xx4b0nzffc0g6r5r27d8m5qhm0cl977qrdk15vbi855g";
}
];
};
acendan-ucs-renaming-tool-media-explorer-filter-lua-4-2 = mkReapackPackage {
inherit lib stdenv fetchurl;
name = "acendan-ucs-renaming-tool-media-explorer-filter-lua-4-2";
Expand Down
6 changes: 3 additions & 3 deletions reapack-packages/albertov5-reapertools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,17 @@
{
path = ''stoicOSC/stoic.reaperOSC'';
url = "https://github.com/AlbertoV5/stoicOSC/blob/main/Reapack/stoic.ReaperOSC";
sha256 = "1c2spn3xj5fa1g50hdpjgrwpv1974b2fh9ggv0jh5lc9fb5my8vp";
sha256 = "07y52i5q80435pwamws9v95sz2s91hdhj6mbakxg9f42rszgvrjl";
}
{
path = ''stoicOSC/stoic.tosc'';
url = "https://github.com/AlbertoV5/stoicOSC/blob/main/Reapack/stoic.tosc";
sha256 = "0sy90scb1mn2lb1la8myyjl61w37jvlhglshcmb3rb4wgigb9ama";
sha256 = "0k29ad1daaysxsr2yzdzn8b8pqg9l47svm7hqhc69rxmpbij71nn";
}
{
path = ''stoicOSC/stoic.xml'';
url = "https://github.com/AlbertoV5/stoicOSC/blob/main/Reapack/stoic.xml";
sha256 = "1y66k7m9hc00nnz2a9gzgwxk3ylywcs339ffkka1vypa50jjyq1a";
sha256 = "1f6rjblsz3j873cv96pg2971cds593rn3704r0qa057b7m8nbl1x";
}
];
};
Expand Down
Loading

0 comments on commit b616000

Please sign in to comment.