2023-06-20 15:19:03 +00:00
|
|
|
{ pkgs }:
|
2023-02-10 17:34:46 +00:00
|
|
|
|
2023-06-20 15:19:03 +00:00
|
|
|
pkgs.rustPlatform.buildRustPackage rec {
|
2023-04-22 13:12:30 +00:00
|
|
|
pname = "bin";
|
2023-09-14 13:29:08 +00:00
|
|
|
version = "e8fac0f0c8c9b48e3933c6f4a9e607a99cc97cf8";
|
2023-02-10 17:34:46 +00:00
|
|
|
|
2023-06-20 15:19:03 +00:00
|
|
|
src = pkgs.fetchFromGitHub {
|
2023-02-10 17:34:46 +00:00
|
|
|
owner = "WantGuns";
|
2023-04-22 13:12:30 +00:00
|
|
|
repo = pname;
|
2023-02-10 17:34:46 +00:00
|
|
|
rev = version;
|
2023-09-14 13:29:08 +00:00
|
|
|
sha256 = "sha256-c5iuk1T3x17iEbLAno716pkQkRtVsB0UJzgIrR64Uec=";
|
2023-02-10 17:34:46 +00:00
|
|
|
};
|
|
|
|
|
2023-10-22 11:15:24 +00:00
|
|
|
# Use custom syntax highlighting theme
|
|
|
|
preBuild = ''
|
|
|
|
cp ${
|
|
|
|
../../external/paramount-dark.tmTheme
|
|
|
|
} resources/themes/paramount-dark.tmTheme
|
|
|
|
|
|
|
|
substituteInPlace src/models/pretty.rs \
|
|
|
|
--replace "ayu_dark.tmTheme" "paramount-dark.tmTheme" \
|
|
|
|
|
|
|
|
substituteInPlace static/css/index.css static/css/pretty.css templates/* \
|
|
|
|
--replace "#0f1419" "#000000" \
|
|
|
|
--replace "#f29718" "#a790d5" \
|
|
|
|
--replace "#F29718" "#a790d5" \
|
|
|
|
--replace "#be7611" "#8673aa"
|
|
|
|
'';
|
|
|
|
|
2023-02-10 17:34:46 +00:00
|
|
|
cargoLock = { lockFile = "${src}/Cargo.lock"; };
|
|
|
|
|
2023-06-20 15:19:03 +00:00
|
|
|
nativeBuildInputs = [ pkgs.git ];
|
2023-06-01 17:07:54 +00:00
|
|
|
|
2023-02-10 17:34:46 +00:00
|
|
|
meta = {
|
|
|
|
description = "highly opinionated, minimal pastebin";
|
|
|
|
homepage = "https://github.com/WantGuns/bin";
|
|
|
|
};
|
|
|
|
}
|