2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2024-02-29 20:09:43 +00:00
|
|
|
, python3
|
|
|
|
, testers
|
|
|
|
, cringify
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cringify";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.2.0";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sansyrox";
|
|
|
|
repo = "cringify";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "857c2620ac9f1f53139d3a599e55679a75e77053";
|
|
|
|
hash = "sha256-U0tKYFRZToMALSeItn9yia7Dl7omETDTkuRlWJ8EZEo=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-OQXGn6m6VdSlxaCPRonjvEo/GOpsEiZkqL12UdoLu0Q=";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
# Upstream doesn't set the version string itself
|
|
|
|
substituteInPlace src/main.rs --replace '0.0.1' ${version}
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [ python3 ];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# No tests are present in the repository
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = cringify; };
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
meta = {
|
|
|
|
description = "Annoy your friends with the cringified text";
|
|
|
|
homepage = "https://github.com/sansyrox/cringify";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
mainProgram = "cringify";
|
|
|
|
maintainers = with lib.maintainers; [ tomasajt ];
|
|
|
|
};
|
|
|
|
}
|