push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,116 @@
{
stdenv,
lib,
fetchFromGitHub,
crystal,
wrapGAppsHook4,
desktopToDarwinBundle,
gobject-introspection,
nautilus-python,
python3,
libadwaita,
openssl,
libxml2,
pkg-config,
gitUpdater,
_experimental-update-script-combinators,
runCommand,
crystal2nix,
writeShellScript,
}:
crystal.buildCrystalPackage rec {
pname = "Collision";
version = "3.10.0";
src = fetchFromGitHub {
owner = "GeopJr";
repo = "Collision";
rev = "v${version}";
hash = "sha256-ZXGhMicwlkXUw8I6HUNVxY4vCaVixdV76+wYn34Py6Q=";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail 'gtk-update-icon-cache $(PREFIX)/share/icons/hicolor' 'true'
'';
shardsFile = ./shards.nix;
copyShardDeps = true;
preBuild = ''
cd lib/gi-crystal && shards build -Dpreview_mt --release --no-debug && \
install -Dm755 bin/gi-crystal ../../bin/gi-crystal && cd ../..
'';
# Crystal compiler has a strange issue with OpenSSL. The project will not compile due to
# main_module:(.text+0x6f0): undefined reference to `SSL_library_init'
# There is an explanation for this https://danilafe.com/blog/crystal_nix_revisited/
# Shortly, adding pkg-config to buildInputs along with openssl fixes the issue.
nativeBuildInputs = [
wrapGAppsHook4
pkg-config
gobject-introspection
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
];
buildInputs = [
libadwaita
openssl
libxml2
nautilus-python
python3.pkgs.pygobject3
];
buildTargets = [
"bindings"
"build"
];
doCheck = false;
doInstallCheck = false;
installTargets = [
"desktop"
"install"
];
postInstall = ''
install -Dm555 ./nautilus-extension/collision-extension.py -t $out/share/nautilus-python/extensions
'';
passthru = {
updateScript = _experimental-update-script-combinators.sequence [
(gitUpdater { rev-prefix = "v"; })
(_experimental-update-script-combinators.copyAttrOutputToFile "collision.shardLock" "./shard.lock")
{
command = [
(writeShellScript "update-lock" "cd $1; ${lib.getExe crystal2nix}")
./.
];
supportedFeatures = [ "silent" ];
}
{
command = [
"rm"
"./shard.lock"
];
supportedFeatures = [ "silent" ];
}
];
shardLock = runCommand "shard.lock" { inherit src; } ''
cp $src/shard.lock $out
'';
};
meta = with lib; {
description = "Check hashes for your files";
homepage = "https://github.com/GeopJr/Collision";
license = licenses.bsd2;
mainProgram = "collision";
maintainers = with maintainers; [ sund3RRR ];
teams = [ teams.gnome-circle ];
};
}

View File

@@ -0,0 +1,42 @@
{
blake3 = {
url = "https://github.com/geopjr/blake3.cr.git";
rev = "v1.4.0";
sha256 = "1kp3rqddcsjj15syfnfvsx694nmpjzxmgawnf7y7dxdakk3przlw";
};
gettext = {
url = "https://github.com/geopjr/gettext.cr.git";
rev = "v1.0.0";
sha256 = "1y27m4170rr4532j56grzhwbz8hj6z7j3zfkd0jnfwnsxclks1kc";
};
gi-crystal = {
url = "https://github.com/hugopl/gi-crystal.git";
rev = "v0.25.0";
sha256 = "0lgs85khg6yzmw7vnkjxygrga1618440hayjc51jmjcfh2lff1k2";
};
gtk4 = {
url = "https://github.com/hugopl/gtk4.cr.git";
rev = "v0.17.0";
sha256 = "0lv3nvsanxi4g2322zvkf1jxx5zgzaapk228vcw2cl0ja1drm06d";
};
harfbuzz = {
url = "https://github.com/hugopl/harfbuzz.cr.git";
rev = "v0.2.0";
sha256 = "06wgqxwyib5416yp53j2iwcbr3bl4jjxb1flm7z103l365par694";
};
libadwaita = {
url = "https://github.com/hugopl/libadwaita.cr.git";
rev = "v0.1.0";
sha256 = "13iqij1rwqdlsd9gls3gz4i4frlsda3yasdbbmrzpa8d3qm3p8yq";
};
non-blocking-spawn = {
url = "https://github.com/geopjr/non-blocking-spawn.git";
rev = "v1.1.0";
sha256 = "1h43gskannylaai4dz2sjb6rds2h6slm1krg88inan12silhp66c";
};
pango = {
url = "https://github.com/hugopl/pango.cr.git";
rev = "v0.3.1";
sha256 = "0xlf127flimnll875mcq92q7xsi975rrgdpcpmnrwllhdhfx9qmv";
};
}