nixpkgs/pkgs/by-name/cr/cringify/package.nix

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

42 lines
989 B
Nix
Raw Permalink Normal View History

2023-08-19 18:27:47 +02:00
{ lib
, rustPlatform
, fetchFromGitHub
2024-01-26 15:24:56 +01:00
, python3
, testers
, cringify
2023-08-19 18:27:47 +02:00
}:
rustPlatform.buildRustPackage rec {
pname = "cringify";
2024-01-26 15:24:56 +01:00
version = "0.2.0";
2023-08-19 18:27:47 +02:00
src = fetchFromGitHub {
owner = "sansyrox";
repo = "cringify";
2024-01-26 15:24:56 +01:00
rev = "857c2620ac9f1f53139d3a599e55679a75e77053";
hash = "sha256-U0tKYFRZToMALSeItn9yia7Dl7omETDTkuRlWJ8EZEo=";
2023-08-19 18:27:47 +02:00
};
2024-01-26 15:24:56 +01:00
cargoHash = "sha256-OQXGn6m6VdSlxaCPRonjvEo/GOpsEiZkqL12UdoLu0Q=";
2023-08-19 18:27:47 +02:00
postPatch = ''
2024-01-26 15:24:56 +01:00
# Upstream doesn't set the version string itself
substituteInPlace src/main.rs --replace '0.0.1' ${version}
2023-08-19 18:27:47 +02:00
'';
2024-01-26 15:24:56 +01:00
nativeBuildInputs = [ python3 ];
2023-08-19 18:27:47 +02:00
# No tests are present in the repository
doCheck = false;
2024-01-26 15:24:56 +01:00
passthru.tests.version = testers.testVersion { package = cringify; };
2023-08-19 18:27:47 +02: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 ];
};
}