1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 python3,
6 testers,
7 cringify,
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "cringify";
12 version = "0.2.0";
13
14 src = fetchFromGitHub {
15 owner = "sansyrox";
16 repo = "cringify";
17 rev = "857c2620ac9f1f53139d3a599e55679a75e77053";
18 hash = "sha256-U0tKYFRZToMALSeItn9yia7Dl7omETDTkuRlWJ8EZEo=";
19 };
20
21 cargoHash = "sha256-VUMVul3P2GRwihTilVpcEb+A5pJaHxlzkwa3uq+pHtY=";
22
23 postPatch = ''
24 # Upstream doesn't set the version string itself
25 substituteInPlace src/main.rs --replace '0.0.1' ${version}
26 '';
27
28 nativeBuildInputs = [ python3 ];
29
30 # No tests are present in the repository
31 doCheck = false;
32
33 passthru.tests.version = testers.testVersion { package = cringify; };
34
35 meta = {
36 description = "Annoy your friends with the cringified text";
37 homepage = "https://github.com/sansyrox/cringify";
38 license = lib.licenses.mit;
39 mainProgram = "cringify";
40 maintainers = with lib.maintainers; [ tomasajt ];
41 };
42}