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