Compare commits
2 commits
b730a1516e
...
4761b6fd19
Author | SHA1 | Date | |
---|---|---|---|
4761b6fd19 | |||
63a165b801 |
5 changed files with 154 additions and 0 deletions
|
@ -4,7 +4,9 @@ final: prev: {
|
|||
jaspersoft-studio-community = prev.callPackage ./jaspersoft-studio-community.nix { };
|
||||
liberica-17 = prev.callPackage ./liberica.nix { };
|
||||
openwebstart = prev.callPackage ./openwebstart.nix { };
|
||||
project-sekai-cursors = prev.callPackage ./project-sekai-cursors/package.nix { };
|
||||
shlink = prev.callPackage ./shlink/package.nix { };
|
||||
sql-developer = prev.callPackage ./sql-developer.nix { };
|
||||
touhou-cursors = prev.callPackage ./touhou-cursors.nix { };
|
||||
vineflower = prev.callPackage ./vineflower.nix { };
|
||||
}
|
||||
|
|
26
pkgs/project-sekai-cursors/fetch-hashes.sh
Executable file
26
pkgs/project-sekai-cursors/fetch-hashes.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq
|
||||
|
||||
# shellcheck shell=bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
groups=("VirtualSinger" "leoneed" "MMJ" "VBS" "WxS" "N25")
|
||||
|
||||
for group in "${groups[@]}"; do
|
||||
tmpfile=$(mktemp)
|
||||
curl -o "$tmpfile" "https://www.colorfulstage.com/upload_images/media/Download/ani%20file-animation-${group}.zip"
|
||||
hash=$(nix-hash --sri --flat --type sha256 "$tmpfile")
|
||||
|
||||
updatedContent=$(jq ".\"$group-ani\" = \"$hash\"" ./hashes.json)
|
||||
echo -E "$updatedContent" > ./hashes.json
|
||||
done
|
||||
|
||||
for group in "${groups[@]}"; do
|
||||
tmpfile=$(mktemp)
|
||||
curl -o "$tmpfile" "https://www.colorfulstage.com/upload_images/media/Download/cur%20file-static-${group}.zip"
|
||||
hash=$(nix-hash --sri --flat --type sha256 "$tmpfile")
|
||||
|
||||
updatedContent=$(jq ".\"$group-cur\" = \"$hash\"" ./hashes.json)
|
||||
echo -E "$updatedContent" > ./hashes.json
|
||||
done
|
14
pkgs/project-sekai-cursors/hashes.json
Normal file
14
pkgs/project-sekai-cursors/hashes.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"VirtualSinger-ani": "sha256-YUWi9VFoU3UkLMJjC5SB3jzkmXrcoLttj3w/D35Vrco=",
|
||||
"leoneed-ani": "sha256-5HlCdQ5SZ2TCeMjD33FmkhZN+BJOT1Y/eHBvsgsAblk=",
|
||||
"MMJ-ani": "sha256-AYOkEGiScmVtO+NOpe4xtbyn4408iRVXN6Bhdh/pNig=",
|
||||
"VBS-ani": "sha256-oh2rj0oIPBXMWdi7gHNhqlb7VatQiVOfIjt32juAE5o=",
|
||||
"WxS-ani": "sha256-r7+UW0m72QVDIShDsUhrzfVwHy82q3KfHGTcBl9nooE=",
|
||||
"N25-ani": "sha256-clGFuHrFMUV5Va/btiKctQBXVx5c6MGCkAs6Iw3G0Ig=",
|
||||
"VirtualSinger-cur": "sha256-s9+CVTaj+z2UKgbEq0+3z3ql+30S1Q2w2iGFR/FZRxE=",
|
||||
"leoneed-cur": "sha256-o/d8le0+4TnKvyPj3SgETQCZ30fhppgqvsr/uHa5dho=",
|
||||
"MMJ-cur": "sha256-fsLPVuKDqxJjpZl27Ih3+6ybj8aEzVvIZpW4Wmu34v4=",
|
||||
"VBS-cur": "sha256-+Me8JuSK/4bA37l0Gin2s+0A2xe7PKQ1LR8y5SmI1Sc=",
|
||||
"WxS-cur": "sha256-eNJtX/dwOuVdXVeGOjDHxLWQ/UdCMcwuZE4DO2d9sbI=",
|
||||
"N25-cur": "sha256-PJxBWW8klKDE/G77hIHJRSyy5p6W/ICmFMobaw3c3Ww="
|
||||
}
|
76
pkgs/project-sekai-cursors/package.nix
Normal file
76
pkgs/project-sekai-cursors/package.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
unzip,
|
||||
win2xcur,
|
||||
# options
|
||||
group ? "",
|
||||
animated ? false,
|
||||
# can be specified if the provided hashes do not suffice
|
||||
hash ? null,
|
||||
}:
|
||||
let
|
||||
format = if animated then "ani" else "cur";
|
||||
suffix = if animated then "animation" else "static";
|
||||
|
||||
hashes = lib.importJSON ./hashes.json;
|
||||
|
||||
addmissing = fetchurl {
|
||||
url = "https://gist.githubusercontent.com/uku3lig/1a761983e4ae467009a682bea505a513/raw/80ff57a2f4866ede5984e34c48dba1413d1ad353/addmissing.sh";
|
||||
hash = "sha256-UTe3LKcmES6G1XHVvCN9Mvs3fVqaj0+bsv+0E33PmYk=";
|
||||
};
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "project-sekai-cursors-${group}-${suffix}";
|
||||
version = "0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.colorfulstage.com/upload_images/media/Download/${format}%20file-${suffix}-${group}.zip";
|
||||
hash = hashes."${group}-${format}" or hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
unzip
|
||||
win2xcur
|
||||
];
|
||||
|
||||
unpackCmd = "unzip $src -d source";
|
||||
sourceRoot = "source";
|
||||
|
||||
buildPhase = ''
|
||||
mkdir output/
|
||||
win2xcur *.{ani,cur} -o output
|
||||
|
||||
pushd output
|
||||
mv Busy wait
|
||||
mv Diagonal1 size_fdiag
|
||||
mv Diagonal2 size_bdiag
|
||||
mv Help help
|
||||
mv Horizontal ew-resize
|
||||
mv Link pointer
|
||||
mv Move move
|
||||
mv Normal default
|
||||
mv Precision cross
|
||||
mv Text text
|
||||
mv Unavailable not-allowed
|
||||
mv Vertical ns-resize
|
||||
mv Working half-busy
|
||||
|
||||
bash ${addmissing}
|
||||
popd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/icons/${group} Miku/cursors"
|
||||
cp output/{*,.*} "$out/share/icons/${group} Miku/cursors"
|
||||
|
||||
echo -e "[Icon Theme]\nName=${group} Miku" > "$out/share/icons/${group} Miku/index.theme"
|
||||
echo -e "[Icon Theme]\nInherits=${group} Miku" > "$out/share/icons/${group} Miku/cursor.theme"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.all;
|
||||
hydraPlatforms = [ ];
|
||||
};
|
||||
}
|
36
pkgs/touhou-cursors.nix
Normal file
36
pkgs/touhou-cursors.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
character ? "",
|
||||
}:
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "touhou-cursors-${character}";
|
||||
version = "0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mabequinho";
|
||||
repo = "touhou-cursors";
|
||||
rev = "92a5513c5d247fb1813e27ac2986e85def510204";
|
||||
hash = "sha256-XYmEpRkvZK7O9F7s3nKFA9rd7xO0ECEWlVyUb8/whq4=";
|
||||
};
|
||||
|
||||
installPhase =
|
||||
if character == "" then
|
||||
''
|
||||
rm README.md
|
||||
echo "No character provided, please override the package with one of the available characters (eg. 'touhou-cursors.override { character = \"Patchouli\";}')"
|
||||
echo *
|
||||
exit 1
|
||||
''
|
||||
else
|
||||
''
|
||||
mkdir -p $out/share/icons
|
||||
cp -r ${character} $out/share/icons
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.all;
|
||||
hydraPlatforms = [ ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue