13 rustPlatform.buildRustPackage rec {
17 src = fetchFromGitHub {
18 owner = "szabodanika";
21 hash = "sha256-fsRpqSYDsuV0M6Xar2GVoyTgCPT39dcKJ6eW4YXCkQ0=";
24 cargoHash = "sha256-7GSgyh2aJ2f8pozoh/0Yxzbk8Wg3JYuqSy/34ywAc2s=";
27 # Prefix some URLs with args.public_path_as_str() by PeterUpfold
28 # https://github.com/szabodanika/microbin/pull/194
29 # MicroBin returns wrong URLs on deployments with non-root URLs.
31 name = "0001-fixup-explicit-urls.patch";
32 url = "https://github.com/szabodanika/microbin/compare/b8a0c5490d681550d982ad02d67a1aaa0897f503..df062134cbaf3fd0ebcb67af8453a4c66844cd13.patch";
33 hash = "sha256-h13FBuzu2O4AwdhRHF5EX5LaKyPeWJAcaV6SGTaYzTg=";
36 # Minor fixups by LuK1337
37 # https://github.com/szabodanika/microbin/pull/211
38 # Fixup styling, password protected and private pastas.
40 name = "0002-minor-fixups.patch";
41 url = "https://github.com/szabodanika/microbin/compare/b8a0c5490d681550d982ad02d67a1aaa0897f503..3b0c025e9b6dc1ca69269541940bdb53032a048a.patch";
42 hash = "sha256-cZB/jx5d6F+C4xOn49TQ1at/Z4ov26efo9PTtWEdCHw=";
45 # Fix MICROBIN_ETERNAL_PASTA by SouthFox-D
46 # https://github.com/szabodanika/microbin/pull/215
47 # MICROBIN_ETERNAL_PASTA config doesn't work without this.
49 name = "0003-fix-microbin-eternal-pasta.patch";
50 url = "https://github.com/szabodanika/microbin/compare/b8a0c5490d681550d982ad02d67a1aaa0897f503..c7c846c64344b8d51500aa9a4b2e9a92de8d09d8.patch";
51 hash = "sha256-gCio73Jt0F7YCFtQxtf6pPBDLNcyOAcfSsiyjLFzEzY=";
54 # Fix raw pastes returning 404 by GizmoTjaz
55 # https://github.com/szabodanika/microbin/pull/218
56 # Existing pastas return code 404 even when they exist.
58 name = "0004-fix-raw-pastas-returning-404.patch";
59 url = "https://github.com/szabodanika/microbin/compare/b8a0c5490d681550d982ad02d67a1aaa0897f503..e789901520824d4bf610d28923097affe85ead7d.patch";
60 hash = "sha256-R47ozwu/FD1kCu5nx4Gf1cOFeLVFdS67K8RNDygwoZM=";
73 ++ lib.optionals stdenv.hostPlatform.isDarwin [
74 darwin.apple_sdk.frameworks.Security
78 OPENSSL_NO_VENDOR = true;
79 RUSTONIG_SYSTEM_LIBONIG = true;
83 description = "Tiny, self-contained, configurable paste bin and URL shortener written in Rust";
84 homepage = "https://github.com/szabodanika/microbin";
85 changelog = "https://github.com/szabodanika/microbin/releases/tag/v${version}";
86 license = licenses.bsd3;
87 maintainers = with maintainers; [
91 mainProgram = "microbin";