nixpkgs/pkgs/applications/misc/collision/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.3 KiB
Nix
Raw Normal View History

2023-07-19 08:56:50 +00:00
{ stdenv
, lib
, fetchFromGitHub
, crystal
, wrapGAppsHook4
, desktopToDarwinBundle
, gi-crystal
, gobject-introspection
, libadwaita
, openssl
, libxml2
, pkg-config
}:
crystal.buildCrystalPackage rec {
pname = "Collision";
2023-12-02 15:28:42 +00:00
version = "3.6.0";
2023-07-19 08:56:50 +00:00
src = fetchFromGitHub {
owner = "GeopJr";
repo = "Collision";
rev = "v${version}";
2023-12-02 15:28:42 +00:00
hash = "sha256-Qxe4ILDdfYfxu95EvKRTvkAOgDIZDiLymBlZouBWn0M=";
2023-07-19 08:56:50 +00:00
};
patches = [ ./make.patch ];
2023-12-02 15:28:42 +00:00
shardsFile = ./shards.nix;
2023-07-19 08:56:50 +00:00
# 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 gi-crystal ]
++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ];
buildInputs = [ libadwaita openssl libxml2 ];
buildTargets = ["bindings" "build"];
doCheck = false;
doInstallCheck = false;
installTargets = ["desktop" "install"];
meta = with lib; {
description = "Check hashes for your files";
homepage = "https://github.com/GeopJr/Collision";
license = licenses.bsd2;
mainProgram = "collision";
maintainers = with maintainers; [ sund3RRR ];
};
}