Files
nixpkgs/pkgs/by-name/ch/chhoto-url/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.2 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
nixosTests,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "chhoto-url";
version = "6.3.2";
src = fetchFromGitHub {
owner = "SinTan1729";
repo = "chhoto-url";
tag = finalAttrs.version;
hash = "sha256-k5fxU3HWhlYlBjmHNsj4lin7LHdwswbwm5bCVmCMjg8=";
};
sourceRoot = "${finalAttrs.src.name}/actix";
postPatch = ''
substituteInPlace src/{main.rs,services.rs} \
--replace-fail "./resources/" "${placeholder "out"}/share/chhoto-url/resources/"
'';
cargoHash = "sha256-oR1SCEbMMDfQyvhoUJzBiK4VHCZwx+o/PaZBfxPB2K8=";
postInstall = ''
mkdir -p $out/share/chhoto-url
cp -r ${finalAttrs.src}/resources $out/share/chhoto-url/resources
'';
passthru = {
tests = { inherit (nixosTests) chhoto-url; };
updateScript = nix-update-script { };
};
meta = {
description = "Simple, blazingly fast, selfhosted URL shortener with no unnecessary features";
homepage = "https://github.com/SinTan1729/chhoto-url";
changelog = "https://github.com/SinTan1729/chhoto-url/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "chhoto-url";
};
})